Bug 232569

Summary: AX: meter and progress elements are ignored when -webkit-appearance: none is set
Product: WebKit Reporter: Nathan Knowler <nathan>
Component: AccessibilityAssignee: Tyler Wilcock <tyler_w>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, akeerthi, andresg_22, apinheiro, awm16899, cfleizach, dmazzoni, ews-watchlist, jcraig, jdiggs, nathan, samuel_white, tyler_w, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: Mac (Intel)   
OS: macOS 11   
Attachments:
Description Flags
This HTML document is a minimal reproduction of the issue.
none
Patch
none
Patch
none
Patch none

Description Nathan Knowler 2021-11-01 09:51:26 PDT
Created attachment 442984 [details]
This HTML document is a minimal reproduction of the issue.

Overview:

Both the meter and progress elements are ignored in the accessibility tree when `-webkit-appearance: none` is set. This CSS rule is required to provide custom styles for the element.

Steps to Reproduce:

The following has been reproduced in the attached HTML document.

1. Use a meter or progress element in a document.
2. Set `-webkit-appearance: none` on the element in order to "remove" the UA styles to provide custom ones.
3. Test the accessibility of the element.
  a. Using VoiceOver, try to select the element on the page. It’s not possible.
  b. Using the Web Inspector, in the Elements panel, select the element, and, then in Node panel of the Details sidebar, go to the Accessibility section to see that Ignored is set to "Yes" and Role is set to "No matching ARIA role."

Actual Results:

The element can be styled as expected, however, it is no longer accessible by virtue of the fact that `-webkit-appearance: none` has been set. The element seems to have lost its implicit ARIA role and therefore is ignored.

Expected Results:

Authors should be allowed to use `-webkit-appearance: none` to remove the user agent styles for the meter and progress element (as currently works in Safari) without breaking the accessibility of the elements.

Build Date & Hardware:

- macOS 11.6
- Safari Version 15.0 (16612.1.29.41.4, 16612)
Comment 1 Radar WebKit Bug Importer 2021-11-01 09:51:55 PDT
<rdar://problem/84885223>
Comment 2 Nathan Knowler 2021-11-01 10:53:28 PDT
This is reproducible in Safari Technology Preview Release 134 (Safari 15.4, WebKit 16613.1.6.1) as well.
Comment 3 Nathan Knowler 2022-10-14 18:21:39 PDT
An update: the issue seems to be resolved for `<progress>` in Safari 16.0 on macOS 12.6, however, the issue does persist for `<meter>`. The issue still applies even when using the unprefixed `appearance: none` (which Safari began to support in Safari 15.4).

For `<progress>`, I haven’t been able to check the versions between the original report version (15.0) and the version I am currently using (16.0), however, I do believe that it might have been fixed in a 15.x version.
Comment 4 Tyler Wilcock 2022-10-20 21:03:20 PDT
Created attachment 463133 [details]
Patch
Comment 5 Tyler Wilcock 2022-10-20 21:18:01 PDT
Created attachment 463135 [details]
Patch
Comment 6 chris fleizach 2022-10-20 23:21:16 PDT
Comment on attachment 463135 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=463135&action=review

> Source/WebCore/accessibility/AccessibilityProgressIndicator.cpp:149
> +    default:

feel like we should remove this default, in case there was ever a different gaugeRegion added
Comment 7 Tyler Wilcock 2022-10-21 00:31:01 PDT
Created attachment 463137 [details]
Patch
Comment 8 EWS 2022-10-21 11:02:47 PDT
Committed 255836@main (c67d110e0c94): <https://commits.webkit.org/255836@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 463137 [details].