WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: name of abbr element

for

From: Peter Krautzberger
Date: Mar 7, 2023 1:06AM


To answer

> 1. Why does it have name=”Saturday” in the accessibility tree?

The html-aam specification is the relevant piece of the puzzle. It's rather
technical to read but in short: for the elements abbr and dfn specifically,
the title attribute maps to the accessible name.

See also https://w3c.github.io/html-aam/#att-title-abbr

Best,
Peter Krautzberger.

Am Mo., 6. März 2023 um 21:18 Uhr schrieb glen walker < <EMAIL REMOVED>
>:

> It's odd for the accessibility tree to show one name but announce another.
>
> But another odd thing is in the name calculation itself. You said "text
> content has a higher preference than title". That's normally how we think
> of it but if you read the spec carefully,
> https://www.w3.org/TR/accname-1.1/#step2, step 2D says if there's an
> attribute that provides a text alternative, then it has higher precedence
> than "name from content" (step 2F). It uses "title" as an example
> attribute.
>
> What?
>
> That has bugged me for years. The title attribute is referenced in both 2D
> and 2I. 2I doesn't specifically say the "title" attribute but says a
> "tooltip attribute", which for HTML, is the title attribute.
>
> So where does "title" really fall in the precedence order? Most of the
> time it's last. Or at least that's what we see most often. But it's
> theoretically possible for title to be used earlier, according to the spec.
>
>
>
> On Mon, Mar 6, 2023 at 4:12 AM Mark Magennis < <EMAIL REMOVED> >
> wrote:
>
> > In <abbr title="Saturday">Sa</abbr> I would expect the abbr element’s
> name
> > to be “Sa” because text content has a higher preference than title in
> the
> > accessible name computation.
> >
> > However, in both Chrome and Firefox the accessibility tree shows the
> > element having name: “Saturday”. But JAWS and NVDA both read it as “Sa”.
> So
> > I have two questions.
> >
> > 1. Why does it have name=”Saturday” in the accessibility tree?
> > 2. Why do the screen readers read the text content instead of the name?
> >
> > Thanks,
> > Mark
> >
> > Mark Magennis (he)
> > Senior Accessibility Specialist
> > Skillsoft
> > www.skillsoft.com
> >
> > > > > > > > > >
> > > > >