RE: elements with presentational content

I think hidden content should not be included in the naming calculation, such as the following:

 

<button>

Next

<span aria-hidden="true">

>> 

</span>

</button>

 

The label should simply be “Next” and not “Next >>”, as the UIA object now shows on Win7 as the button name in the accessibility tree, which looks like a bug.

 

From: Alexander Surkov [mailto:surkov.alexander@gmail.com] 
Sent: Thursday, May 29, 2014 11:08 AM
To: James Craig
Cc: W3C WAI Protocols & Formats
Subject: Re: elements with presentational content

 

I'd say accessible name should be calculated from content in this case similar to aria-labelledby pointing to hidden content. But is it principal question?

 

On Wed, May 28, 2014 at 4:40 PM, James Craig <jcraig@apple.com <mailto:jcraig@apple.com> > wrote:

Are you saying the following would result in a button with no label, despite the rendered text?

 

<div role="button" aria-leaf="true">

  This text is not exposed to APIs. Use an explicit aria-label?

</div>

 

On May 28, 2014, at 8:27 AM, Alexander Surkov <surkov.alexander@gmail.com <mailto:surkov.alexander@gmail.com> > wrote:





Hi. Lately I run into examples of widgets having presentational content as part of their implementation and that content is exposed to AT which is unfortunate. For example a custom button

<div role="button">

  Presentational content

</div>

UAIG guide suggests [1] to exclude the content from the tree under certain elements aka "Children of objects <http://www.w3.org/WAI/PF/aria-implementation/#def_object>  which have the characteristic "Children Presentational: True":". It's not clear with me what "Children Presentational" is and that's the first issue. The second one the requirement prevents the author to create menu buttons like:

<div role="button">Button

  <div role="button">menu button</div>

</div>

(check out XUL example [2]).

 

So the trick the author could do is to apply aria-hidden="true" on some internal container

<div role="button">

  <div aria-hidden="true">

    Presentational content

  </div>

</div>

Regardless the author have to introduce extra element in the hierarchy what is not nice, this approach requires all browsers get agreed on aria-hidden implementation.

Would it be good to introduce new attribute to let the author cut off the content, for example

<div role="button" aria-leaf="true">

and can be defined as the browser should not expose any children for element having aria-leaf="true" if the content serves the presentational propose (like not focusable, not operable).

Alternative names: aria-nocontent, aria-nokids.

 

Would it be worth to have an extra attribute for that?

Thanks.
Alexander.


[1] http://www.w3.org/WAI/PF/aria-implementation/#exclude_elements2
[2] https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/PopupGuide/MenuButtons#The_%27menu-button%27_button

 

 

Received on Thursday, 29 May 2014 18:31:07 UTC