WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Is it ok to intentionally break WCAG 2.5.3?

for

From: Birkir R. Gunnarsson
Date: Aug 20, 2022 11:05AM


You could create a group element with a label around te button (or
buttons, if there are multiple).
<div role="group" aria-label="Chnage text sizes">
<button>AA</button>
<button>AAA</button>
</div>
That way you give the screen reader user the context of the buttons
(they are quite unlikely to ever need them, but possibly a low vision
user with speech turned on would), without having to hide the visible
text label of the button in its accessible name.


On 8/20/22, glen walker < <EMAIL REMOVED> > wrote:
> Seems like a silly question to ask if it's ok to intentionally break any
> WCAG.
>
> I have a button that brings up a dialog with some accessibility features
> (change the color theme, line spacing, font size, etc). Even though the
> dialog has more options than the font size, the client chose to display the
> button that opens it with an "AA", where the first capital A is small and
> the second is bigger, which is a common way to show font sizes. It's
> similar to the "change case" button in Microsoft Word but they use a
> captial A and a small a. Microsoft decided to set the button name to
> "change case".
>
> Anyway, WCAG 2.5.3 says that the visible label must exist in the accessible
> name. The logical name for the button is "accessibility options" (or
> something like that) but the button displays "AA". I was going to
> recommend the sensible name and not recommend that they put "AA" in the
> name, but this intentionally breaks 2.5.3. For conformance purposes, they
> could have "accessibility options (AA)" but that just sounds weird with a
> screen reader and doesn't make the UX any better, at least for the screen
> reader user.
>
> Now a speech interface user, such as Dragon, won't know the button is
> called "accessibility options" so if they say "Click AA", nothing will
> happen. In general, I always encourage conformance with 2.5.3 but this one
> is tricky. The Dragon user can say "click button" and see all the buttons
> numbered and easily select it, and at some point they can find out the
> accessible name and use it with the "click" command.
>
> Have you ever recommended an accessible name that does not match the
> visible label?
> > > > >


--
Work hard. Have fun. Make history.