W3C home > Mailing lists > Public > wai-xtech@w3.org > November 2015

Re: role mapping rules when context is broken

From: Alexander Surkov <surkov.alexander@gmail.com>
Date: Tue, 3 Nov 2015 11:46:37 -0500
Message-ID: <CA+epNsfWHO7se0ywj+RYyR7NMrNEt_gEpgpzxCF7ADLStGFMKQ@mail.gmail.com>
To: Joseph Scheuhammer <clown@alum.mit.edu>
Cc: W3C WAI-XTECH <wai-xtech@w3.org>
Hi, Joseph. I'm good to have a generic role, but in general I don't see the
benefits of having an accessible for it as long as some generic ARIA
attributes are not applied to it.

On Fri, Oct 30, 2015 at 2:31 PM, Joseph Scheuhammer <clown@alum.mit.edu>
wrote:

> Hi Alex,
>
> On 2015-10-29 2:08 PM, Alexander Surkov wrote:
>
>> Hi. I don't see whether UAIG addresses the case when role was used in a
>> wrong context [1], for example, if parent of role="gridcell" is not
>> role="row". In this case IAccessibleTableCell interface is not applicable
>> for this gridcell accessible, so should the accessible have GRIDCELL role
>> and should the element be accessible at all?
>>
>
> A few thoughts.
>
> This is the kind of error that checking tools should find.  For example,
> W3C's Nu HTML checker will note the context error.  Here's an example:
>
>
> https://validator.w3.org/nu/?showsource=yes&doc=https%3A%2F%2Fdvcs.w3.org%2Fhg%2Fpfwg%2Fraw-file%2Fdefault%2FARIA%2F1.0%2Ftests%2Ftest-files%2Froles-plain-concrete%2Froles-plain-concrete-gridcell.html
>
> However, that said, markup will sometimes have such errors in them. The
> Core-AAM (and the UAIG before it) has a section on author errors [1] that
> mainly says that browsers don't do much in terms of error correction.
> Specifically, they don't validate "Elements that do not correctly observe
> required child/parent role relationships or that appear elsewhere than in
> their required parent".
>
> A compromise would be to give the accessible a generic role in these
> cases.  That doesn't seem like much work.  Consider that the element might
> fire a focus or other accessibility API  event.  Or, it may have an
> aria-flowto, aria-controls, or other information that would be lost if it
> were simply dropped out of the tree.  I suppose if it has no semantic value
> -- no events, no label, no relationships, etc. -- and has a bad role, then
> it could be dropped from the tree.
>
> There's a similar error regarding abstract roles and their mapping. The
> rule there is that browsers MUST NOT map an abstract role [2, item 2], but
> it doesn't say what to do.  It looks like FF gives uses the element's role
> mapping in that case.  For example, <p role="command"> is mapped as
> ROLE_PARAGRAPH, and <div role="command"> is mapped as ROLE_SECTION.
>

Iirc I argued about this rule in the past. It's extra work for the browser
to ignore these roles and there's no point for the user to use them. I
believe those roles should fall into ordinal unknown role processing.


>
> So:  use the element's role mapping?  Or assign it a generic role?
>
> Thanks.
>
> [1]
> http://w3c.github.io/aria/core-aam/core-aam.html#document-handling_author-errors
> [2]
> http://w3c.github.io/aria/core-aam/core-aam.html#roleMappingGeneralRules
> item 2.
>
> --
> ;;;;joseph.
>
> 'Array(16).join("wat" - 1) + " Batman!"'
>            - G. Bernhardt -
>
>
Received on Tuesday, 3 November 2015 16:47:05 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 3 November 2015 16:47:06 UTC