Bug 230611 - AX: aria-errormessage should not be exposed when aria-invalid is false
Summary: AX: aria-errormessage should not be exposed when aria-invalid is false
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Tyler Wilcock
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-09-22 05:05 PDT by Joanmarie Diggs
Modified: 2023-02-20 10:06 PST (History)
10 users (show)

See Also:


Attachments
Patch (9.68 KB, patch)
2023-02-19 01:32 PST, Tyler Wilcock
no flags Details | Formatted Diff | Diff
Patch (11.04 KB, patch)
2023-02-19 02:06 PST, Tyler Wilcock
no flags Details | Formatted Diff | Diff
Patch (15.09 KB, patch)
2023-02-19 11:55 PST, Tyler Wilcock
no flags Details | Formatted Diff | Diff
Patch (15.09 KB, patch)
2023-02-19 12:17 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 Joanmarie Diggs 2021-09-22 05:05:04 PDT
Steps to reproduce:
1. Load: data:text/html, <div role='group' id='test' aria-errormessage='error' aria-invalid='false'>content</div><div id='error'>hello world</div>
2. Examine the accessible relationships for ATK using a platform accessibility inspector (e.g. Accerciser)

Expected results: There would be no error-for/error-message relationships between the two divs
Actual results: There are error-for/error-message relationships between the two divs.

According to https://www.w3.org/TR/wai-aria-1.2/#aria-errormessage:

> User agents MUST NOT expose aria-errormessage for an object with an aria-invalid value of false.

I think this issue also applies to macOS and iOS. However, I was not able to confirm it based on the Core-AAM's stated mappings* for aria-errormessage for macOS, however this test has aria-invalid set to false and still indicates there are error elements: https://trac.webkit.org/browser/webkit/trunk/LayoutTests/accessibility/mac/aria-errormessage.html

*The Core-AAM says the following for aria-errormessage:

> AX API	Property: AXValidationError: textual content of the referenced element

But I don't see that in Accessibility Inspector when aria-invalid set to true.
Comment 1 Radar WebKit Bug Importer 2021-09-22 05:05:18 PDT
<rdar://problem/83393652>
Comment 2 Tyler Wilcock 2023-02-19 01:32:54 PST
Created attachment 465072 [details]
Patch
Comment 3 Tyler Wilcock 2023-02-19 02:06:11 PST
Created attachment 465073 [details]
Patch
Comment 4 Tyler Wilcock 2023-02-19 11:55:16 PST
Created attachment 465076 [details]
Patch
Comment 5 Tyler Wilcock 2023-02-19 12:17:12 PST
Created attachment 465077 [details]
Patch
Comment 6 EWS 2023-02-20 10:06:11 PST
Committed 260545@main (19ae041e1fa8): <https://commits.webkit.org/260545@main>

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