Re: Buttons out of context

How about taking advantage of the fact that aria-labeledby can take a list
of space-separated values?...

<span id="1">maths papers</span><button arial-labeledby="2 1"><span
id="2">Download</span></button>

<span id="3">geography papers</span><button arial-labeledby="4 3"><span
id="4">Download</span></button>

<span id="5">physics papers</span><button arial-labeledby="6 5"><span
id="6">Download</span></button>

JF

On Thu, Nov 17, 2022 at 7:10 AM Marc Haunschild (Accessibility Consulting)
<marc.haunschild@accessibility.consulting> wrote:

> Hi Tom,
>
> There are meaningful labels, so no fail here.
>
> But they are not programmatically determinable.
>
> So here is the fail.
>
> --
> Mit freundlichen Grüßen
>
> Marc Haunschild
> https://Accessibility.Consulting
>
> Am 17.11.2022 um 12:23 schrieb Tom Shaw <Tom-Shaw@hotmail.com>:
>
> 
> Hi all.
>
> I'd like to quickly discuss button and specifically out of context. I
> quote the following from WCAG 2.4.6
>
> "When headings and labels are also correctly marked up and identified in
> accordance with 1.3.1: Info and Relationships
> <https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships>,
> this Success Criterion helps people who use screen readers by ensuring that
> labels and headings are meaningful when read out of context, for example,
> in an automatically generated list of headings/table of contents, or when
> jumping from heading to heading within a page."
>
>
> maths papers
> <button>Download</button>
>
> geography papers
> <button>Download</button>
>
> physics papers
> <button>Download</button>
>
> So, what I'm reading from that is that it fails 2.4.6, but is there an
> argument that this may also fail 1.3.1, too? As the visible labels that
> help you identify the purpose of the fields are not programmatically
> associated?
>
> As always thank you for your time I appreciate it!
>
> Tom
>
> (I will provide more context for my previous link issue later today) 🙂
>
>
>
>

-- 
*John Foliot* |
Senior Industry Specialist, Digital Accessibility |
W3C Accessibility Standards Contributor |

"I made this so long because I did not have time to make it shorter." -
Pascal "links go places, buttons do things"

Received on Thursday, 17 November 2022 17:59:10 UTC