w3c / html-aam

HTML Accessibility API Mappings - new spec updates should be made in https://github.com/w3c/aria/tree/main/html-aam
https://w3c.github.io/html-aam/
Other
100 stars 27 forks source link

HTML AAM: VoiceOver (AXAPI) mapping for optimum, low <meter> attributes #536

Open MReschenberg opened 6 months ago

MReschenberg commented 6 months ago

Hi there, I'm working on VoiceOver support in Firefox and noticed the spec does not specify platform mappings for "low" and "optimum" HTML attributes on <meter> elements.

In Safari, VoiceOver reads "suboptimum value" for something like: data:text/html,<label for="fuel">Fuel level:</label><meter id="fuel" min="0" max="100" low="33" high="66" optimum="80" value="50">at 50/100</meter>

"optimal value" for: data:text/html,<label for="fuel">Fuel level:</label><meter id="fuel" min="0" max="100" low="33" high="66" optimum="80" value="81">at 81/100</meter>

and "critical value" for: data:text/html,<label for="fuel">Fuel level:</label><meter id="fuel" min="0" max="100" low="33" high="66" optimum="80" value="10">at 10/100</meter>

This string is appended to AXValueDescription, such that the total property reads, for example: "at 81/100, optimal value"

Can this mapping be added to the spec if it is official recommended practise?

scottaohara commented 6 months ago

Hey, thanks for calling this out.

These can absolutely be added. Would you mind making the PR to update the table?

cookiecrook commented 5 months ago

This issue should have an active test case showing this in a more common use case, like an audio meter bouncing quickly and showing critical peak line clipping.

I’m not sure if this will need new API, or if there is existing API, but web meters should match the same or similar API to other accessible, native audio meters on macOS. I don’t think AXValueDescription is the right choice, but will discuss with colleagues.

Thanks for raising the issue!

Update: dynamic meter test case added to a new WebKit Accessibility bug.