Re: Do text nodes, e.g. paragraphs have an "Accessible Name"

I'll just refer here to Accessible Name and Description Computation 1.2
https://www.w3.org/TR/accname-1.2/#dfn-accessible-name

To quote:
A simple use for the accessible name property may be illustrated by an "OK"
button. The text "OK" is the accessible name. When the button receives
focus, assistive technologies may concatenate the platform's role
description with the accessible name. For example, a screen reader may
speak "push-button OK" or "OK button". The order of concatenation and
specifics of the role description (e.g., "button", "push-button",
"clickable button") are determined by platform accessibility API
<https://www.w3.org/TR/wai-aria-1.2/#dfn-accessibility-api>s or assistive
technologies <https://www.w3.org/TR/accname-1.2/#dfn-assistive-technologies>.

--------
so in short the accessible name is pretty much determined by whatever
platform is interpreting the markup.

So to go with my earlier mail, if I were making a screen reader or a
platform or whatever that had to provide the accessible names to the user,
a paragraph may have an accessible name due to various attributes or
conditions - now some obvious ones are roles and then it is no longer a
paragraph it is whatever role it is given and that helps determine the
accessible name, but an accessible name could probably be derived by some
assistive tech due to other things than just the role - for example if you
have  this markup

<div><p onclick="somefunction()">hey this paragraph is cliickable</p><p>non
interactive paragraphs</p></div>

I could easily see some tech giving the first paragraph a name

Clickable Paragraph - text is "hey this paragraph is cliickable"

and if it was content editable but did not have a role then I would still
think it should have a name, so editable paragraph - text is "the text in
the paragraph"

so - basically a non-interactive paragraph does not get an accessible name,
because it probably would not be sensible to give it one- in what way would
you give an accessible name to a paragraph that would not just make it more
verbose and harder to understand without giving any useful information?

But if it became interactive in some way it might be that a particular
technology platform sees fit to give that paragraph an accessible name,,
even if the author has not given it any roles or other indicators that the
paragraph should have a name,  because it might be thought beneficial to
tell a user that the element is interactive in a specific way.

this however is pretty much my own opinion on how I think things should
work, and is probably not in line with what accepted thought on the matter
is which seems to be that paragraphs should NEVER have accessible names
'(unless they have a role)

Cheers,
Bryan Rasmussen




On Fri, Nov 1, 2024 at 8:39 PM Laurence Lewis <laurence.r.lewis@gmail.com>
wrote:

> Hi Taliesin
>
> The ARIA spec includes lists for the names from.
>
>   * 5.2.8.4 Roles Supporting Name from Author
>   * 5.2.8.5 Roles Supporting Name from Content
>   * 5.2.8.6 Roles which cannot be named (Name prohibited)
>
> https://www.w3.org/TR/wai-aria-1.2/#namefromauthor
>
> The lists contain the information Bryan is referring to also provided in
> the tables for the roles, properties and states.
>
> Regards
> Laurence Lewis
> Accessibility Senior Specialist - Telstra Queensland Australia
>
> On Sat, 2 Nov 2024 at 1:15 AM, Bryan Garaventa <
> bryan.garaventa@whatsock.com> wrote:
>
>> Hi,
>>
>> No, the term accessible name does not just apply to interactive elements,
>> but only certain roles accept name from content as a valid naming mechanism.
>>
>>
>>
>> I’m travelling at the moment so can’t look this up, but if you go to the
>> ARIA spec and look up the role “Heading”, you will see at the end of that
>> section a table that starts with “Name from”, and if it says “Content” then
>> this role supports name from content as a valid naming mechanism.
>>
>>
>>
>> All other roles listed there have a similar table to identify which ones
>> support this method and others that don’t, and these are not specific to
>> only interactive elements.
>>
>>
>>
>> Happy to help further when I get back. 😊
>>
>>
>>
>> All the best,
>>
>> Bryan
>>
>>
>>
>>
>>
>> *From:* Taliesin Smith <talilief@gmail.com>
>> *Sent:* Friday, November 1, 2024 7:29 AM
>> *To:* Bryan Garaventa <bryan.garaventa@whatsock.com>
>> *Cc:* bryan rasmussen <rasmussen.bryan@gmail.com>; WAI IG <
>> w3c-wai-ig@w3.org>
>> *Subject:* Re: Do text nodes, e.g. paragraphs have an "Accessible Name"
>>
>>
>>
>> Hi Bryan,
>>
>>
>>
>> Thanks for your comment and guidance.
>>
>>
>>
>> I am trying to understand if the inner text content or Inner left text as
>> some browsers call it of elements like paragraphs, divs, spans, block
>> quotes - elements that are not directly interactive - becomes the
>> accessible name of the content-like elements or if the term “accessible
>> name” is reserved specifically for interactive elements like a button,
>> checkbox, slider, etc.
>>
>>
>>
>> I understand that an accessible name can be provided through diverse
>> techniques, some preferred over other.
>>
>>
>>
>> Is inner content for non-interactive elements ever considered to be an
>> accessible name?
>>
>>
>>
>> Taliesin
>>
>> ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~
>> Taliesin L. Smith
>> talilief@gmail.com
>>
>> taliesin.smith@colorado.edu
>>
>> Inclusive Design Research Specialist
>> PhET Interactive Simulations
>> http://phet.colorado.edu/
>> Department of Physics
>> University of Colorado, Boulder
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Oct 26, 2024, at 09:00, Bryan Garaventa <bryan.garaventa@whatsock.com>
>> wrote:
>>
>>
>>
>> Hi,
>>
>> No, paragraphs, divs, and spans do not receive accessible names. Many
>> static elements that have implicit roles do though, such as a heading.
>> Typically this happens by itself in the background for such things like
>> headings since they receive ‘name from content’.
>>
>>
>>
>> If unclear, you can use this page to test it.
>>
>>
>> https://whatsock.github.io/w3c-alternative-text-computation/Editable%20Live%20Input%20AccName%20Test.html
>>
>>
>>
>> E.G. This results in no accessible name.
>>
>>
>>
>> <p id="test" aria-label="Something" > Content </p>
>>
>>
>>
>> However this does result in the accessible name: “Something”
>>
>>
>>
>> <p role="heading" id="test" aria-label="Something" > Content </p>
>>
>>
>>
>> Note this can be dangerous though, because now the content is
>> inaccessible.
>>
>>
>>
>> Please be very careful when applying aria-label and aria-labelledby to
>> elements. It’s always good to test them first to be sure.
>>
>>
>>
>> All the best,
>>
>> Bryan
>>
>>
>>
>> On Fri, Oct 25, 2024 at 8:37 PM Taliesin Smith <talilief@gmail.com>
>> wrote:
>>
>> Dear Interest Group Members,
>>
>>
>>
>> I have always thought of an "accessible name" as required content for an
>> interactive thing like a button or a checkbox or slider, etc.
>>
>>
>>
>> Do text elements like paragraphs, headings, list items have accessible
>> names, that is if there is no added aria-label attribute.
>>
>>
>>
>> Developers on our team are abstracting / simplifying our current API that
>> builds accessibility into our interactive simulations. The plan is to make
>> the API very simple, like everything gets an accessible name. This seemed a
>> little odd to me, as I have never thought of a paragraph as having an
>> accessible name.
>>
>>
>>
>> Do text nodes have accessible names by default?
>>
>>
>>
>> Taliesin
>>
>>
>>
>>
>>
>> ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~
>> Taliesin L. Smith
>> talilief@gmail.com
>>
>> taliesin.smith@colorado.edu
>>
>> Inclusive Design Research Specialist
>> PhET Interactive Simulations
>> http://phet.colorado.edu/
>> Department of Physics
>> University of Colorado, Boulder
>>
>>
>>
>

Received on Friday, 1 November 2024 20:33:30 UTC