-
Notifications
You must be signed in to change notification settings - Fork 157
aria-errormessage is hidden or removed when not pertinent #1588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
039f50a
ac6d2d1
84294de
b64114e
230ab44
6353497
5cf0183
e1dee89
57c249b
8328b20
1f6f4f0
d81b98c
baa3cce
3d0432f
9e45f23
2eed17c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| [ | ||
| { | ||
| "description": "Ensures all ARIA attributes have valid values", | ||
| "help": "ARIA attributes must conform to valid values", | ||
| "helpUrl": "https://dequeuniversity.com/rules/axe/4.3/aria-valid-attr-value?application=webdriverjs", | ||
| "id": "aria-valid-attr-value", | ||
| "impact": "critical", | ||
| "nodes": [ | ||
| { | ||
| "all": [ | ||
| { | ||
| "data": [ | ||
| "id-message-1" | ||
| ], | ||
| "id": "aria-errormessage", | ||
| "impact": "critical", | ||
| "message": "aria-errormessage value `id-message-1` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)", | ||
| "relatedNodes": [] | ||
| } | ||
| ], | ||
| "any": [], | ||
| "failureSummary": "Fix all of the following:\n aria-errormessage value `id-message-1` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)", | ||
| "html": "<input type=\"text\" id=\"input-1\" aria-invalid=\"true\" aria-errormessage=\"id-message-1\" class=\"fail\">", | ||
| "impact": "critical", | ||
| "none": [], | ||
| "target": [ | ||
| "#input-1" | ||
| ] | ||
| }, | ||
| { | ||
| "all": [ | ||
| { | ||
| "data": [ | ||
| "id-message-2" | ||
| ], | ||
| "id": "aria-errormessage", | ||
| "impact": "critical", | ||
| "message": "aria-errormessage value `id-message-2` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)", | ||
| "relatedNodes": [] | ||
| } | ||
| ], | ||
| "any": [], | ||
| "failureSummary": "Fix all of the following:\n aria-errormessage value `id-message-2` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)", | ||
| "html": "<input type=\"text\" id=\"input-2\" aria-invalid=\"true\" aria-errormessage=\"id-message-2\" class=\"fail\">", | ||
| "impact": "critical", | ||
| "none": [], | ||
| "target": [ | ||
| "#input-2" | ||
| ] | ||
| }, | ||
| { | ||
| "all": [ | ||
| { | ||
| "data": [ | ||
| "id-message-3" | ||
| ], | ||
| "id": "aria-errormessage", | ||
| "impact": "critical", | ||
| "message": "aria-errormessage value `id-message-3` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)", | ||
| "relatedNodes": [] | ||
| } | ||
| ], | ||
| "any": [], | ||
| "failureSummary": "Fix all of the following:\n aria-errormessage value `id-message-3` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)", | ||
| "html": "<input type=\"text\" id=\"input-3\" aria-invalid=\"true\" aria-errormessage=\"id-message-3\" class=\"fail\">", | ||
| "impact": "critical", | ||
| "none": [], | ||
| "target": [ | ||
| "#input-3" | ||
| ] | ||
| }, | ||
| { | ||
| "all": [ | ||
| { | ||
| "data": [ | ||
| "id-message-7" | ||
| ], | ||
| "id": "aria-errormessage", | ||
| "impact": "critical", | ||
| "message": "aria-errormessage value `id-message-7` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)", | ||
| "relatedNodes": [] | ||
| } | ||
| ], | ||
| "any": [], | ||
| "failureSummary": "Fix all of the following:\n aria-errormessage value `id-message-7` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)", | ||
| "html": "<input type=\"text\" id=\"input-7\" aria-invalid=\"true\" aria-errormessage=\"id-message-7\" class=\"pass\">", | ||
| "impact": "critical", | ||
| "none": [], | ||
| "target": [ | ||
| "#input-7" | ||
| ] | ||
| } | ||
| ], | ||
| "tags": [ | ||
| "cat.aria", | ||
| "wcag2a", | ||
| "wcag412" | ||
| ] | ||
| } | ||
| ] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| <html lang="en-US"> | ||
| <head><title>When aria-errormessage is pertinent, authors MUST ensure the content is not hidden so users can navigate to and examine the error message</title></head> | ||
| <body> | ||
|
|
||
| <!-- | ||
| URL: https://www.w3.org/TR/wai-aria-1.2/#aria-errormessage | ||
| RULE: " Authors MUST use aria-invalid in conjunction with aria-errormessage and when aria-errormessage is pertinent, authors MUST ensure the content is not hidden so users can navigate to and examine the error message" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Question, potential blocker: Should an example be included that has no From the spec, emphasis mine:
WDYT?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we would if this were a test file for all of aria-errormessage. However this is only a testfile for the added authors MUST statements in aria 1.2. Without aria-invalid, aria-errormessage is not pertinent so the entire sentence would not apply. |
||
| --> | ||
|
|
||
| <!-- inputs with aria-errormessage that should fail --> | ||
|
|
||
| <input type="text" id="error-message-hidden-1" aria-invalid="true" aria-errormessage="id-message-1" class="fail"></div> | ||
| <div id="id-message-1" hidden>Error message 1</div> | ||
|
|
||
| <input type="text" id="error-message-hidden-2" aria-invalid="true" aria-errormessage="id-message-2" class="fail"></div> | ||
| <div id="id-message-2" style="display: none">Error message 2</div> | ||
|
|
||
| <input type="text" id="error-message-hidden-3" aria-invalid="true" aria-errormessage="id-message-3" class="fail"></div> | ||
| <div id="id-message-3" style="visibility: hidden">Error message 3</div> | ||
|
|
||
| <!-- inputs with aria-errormessage that should pass --> | ||
|
|
||
| <input type="text" id="aria-invalid-value-false-1" aria-invalid="false" aria-errormessage="id-message-4" class="pass"></div> | ||
| <div id="id-message-4" hidden>Error message 4</div> | ||
|
|
||
| <input type="text" id="aria-invalid-value-false-2" aria-invalid="false" aria-errormessage="id-message-5" class="pass"></div> | ||
| <div id="id-message-5" style="display: none">Error message 5</div> | ||
|
|
||
| <input type="text" id="aria-invalid-value-false-3" aria-invalid="false" aria-errormessage="id-message-6" class="pass"></div> | ||
| <div id="id-message-6" style="visibility: hidden">Error message 6</div> | ||
|
|
||
| <input type="text" id="aria-invalid-visible-1" aria-invalid="true" aria-errormessage="id-message-7" class="pass"></div> | ||
| <div id="id-message-7">Error message 7</div> | ||
|
|
||
| </body> | ||
| </html> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question, non-blocker: Is the query param needed here? It seems like the URL is valid without it. Just curious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the file retrieved from aXe. I don't think we should be changing it.