Bug 250124 - AX: Wrong role displayed for input in Safari inspector
Summary: AX: Wrong role displayed for input in Safari inspector
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Safari 16
Hardware: Mac (Apple Silicon) macOS 13
: P2 Minor
Assignee: Tyler Wilcock
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-01-05 02:23 PST by Giacomo Petri
Modified: 2023-02-27 00:49 PST (History)
11 users (show)

See Also:


Attachments
Screenshot displaying Role: No matching ARIA role for input type="text" (323.71 KB, image/png)
2023-01-05 02:23 PST, Giacomo Petri
no flags Details
Patch (15.53 KB, patch)
2023-02-26 13:11 PST, Tyler Wilcock
no flags Details | Formatted Diff | Diff
Patch (20.59 KB, patch)
2023-02-26 17:26 PST, Tyler Wilcock
no flags Details | Formatted Diff | Diff
Patch (20.64 KB, patch)
2023-02-26 17:52 PST, Tyler Wilcock
no flags Details | Formatted Diff | Diff
Patch (21.58 KB, patch)
2023-02-26 18:56 PST, Tyler Wilcock
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Giacomo Petri 2023-01-05 02:23:56 PST
Created attachment 464344 [details]
Screenshot displaying Role: No matching ARIA role for input type="text"

Even though, using VoiceOver + Safari the input type="text" is properly announced as "$label, edit text" which properly convey the element semantic, from the inspector the role provided within the Accessibility section is "No matching ARIA role", which is not true. 
Even forcing the role="textbox" the role is still "No matching ARIA role".

This contrasts with both the WAI-ARIA (https://www.w3.org/TR/wai-aria-1.2/#textbox) and HTML Accessibility API Mappings (https://www.w3.org/TR/html-aam-1.0/#el-input-text).

Similarly, this happens for other input types:
* email (Role: "No matching aria role" but it should be "textbox", as per html-aam-1.0 - https://www.w3.org/TR/html-aam-1.0/#el-input-email)
* number (Role: "No matching aria role" but it should be "textbox", as per html-aam-1.0 - https://www.w3.org/TR/html-aam-1.0/#el-input-number)
* tel (Role: "No matching aria role" but it should be "textbox", as per html-aam-1.0 - https://www.w3.org/TR/html-aam-1.0/#el-input-tel)
* url (Role: "No matching aria role" but it should be "textbox", as per html-aam-1.0 - https://www.w3.org/TR/html-aam-1.0/#el-input-url)

Differently, it's behaving as expected for input types like:
* checkbox
* search
* button/reset/submit
* image
* range
* color (Role: "No matching aria role" but it's correct, as per html-aam-1.0 - https://www.w3.org/TR/html-aam-1.0/#el-input-color)
* etc.
Comment 1 Radar WebKit Bug Importer 2023-01-05 02:24:08 PST
<rdar://problem/103907008>
Comment 2 Tyler Wilcock 2023-02-26 13:11:14 PST
Created attachment 465187 [details]
Patch
Comment 3 Tyler Wilcock 2023-02-26 17:26:25 PST
Created attachment 465190 [details]
Patch
Comment 4 Tyler Wilcock 2023-02-26 17:52:46 PST
Created attachment 465191 [details]
Patch
Comment 5 Tyler Wilcock 2023-02-26 18:56:52 PST
Created attachment 465192 [details]
Patch
Comment 6 EWS 2023-02-27 00:49:13 PST
Committed 260868@main (5cd01f201aba): <https://commits.webkit.org/260868@main>

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