Re: elements with presentational content

That example came to me from two different screen reader vendors so I
assume if the button has children then they traverse them not taking into
account accessible name. Do I understand right that VoiceOver never gets
into button subtree if accessible name was provided?


On Thu, May 29, 2014 at 2:54 PM, James Craig <jcraig@apple.com> wrote:

> Doesn't this already do what you want without an additional attribute?
>
> <div role="button">
>   Non-presentational content (exposed to API)
> </div>
>
> <div role="button" aria-label="Non-presentational content (exposed to
> API)">
>   Presentational content (not exposed to API)
> </div>
>
>
> On May 29, 2014, at 11:08 AM, Alexander Surkov <surkov.alexander@gmail.com>
> wrote:
>
> > 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> 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> 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 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 19:16:06 UTC