Skip to content

feat(aria-allowed-attr): report violation for non-global ARIA attrs on element without role#3342

Merged
straker merged 6 commits intodevelopfrom
aria-allowed-custom-elms
Jan 13, 2022
Merged

feat(aria-allowed-attr): report violation for non-global ARIA attrs on element without role#3342
straker merged 6 commits intodevelopfrom
aria-allowed-custom-elms

Conversation

@straker
Copy link
Copy Markdown
Contributor

@straker straker commented Jan 10, 2022

This change reintroduces the change to report violations on elements without a role for non-global ARIA attrs, which was reverted when we accidentally released it.

This also introduces a fix for custom elements where we will report Needs Review for any custom element that uses a non-global ARIA attribute (rather than a failure).

Closes issue: #3241

@straker straker requested a review from a team as a code owner January 10, 2022 18:34
@straker
Copy link
Copy Markdown
Contributor Author

straker commented Jan 10, 2022

The error from aria practices seems to be a legit issue on aria practices? The violation reported on the button_idl.html page is from an anchor element which uses aria-pressed, which shouldn't be allowed.

This is the page: https://www.w3.org/TR/wai-aria-practices-1.2/examples/button/button_idl.html

And the error:

{
    "any": [
        {
            "id": "aria-allowed-attr",
            "data": [
                "aria-pressed=\"false\""
            ],
            "relatedNodes": [],
            "impact": "critical",
            "message": "ARIA attribute is not allowed: aria-pressed=\"false\""
        }
    ],
    "all": [],
    "none": [],
    "impact": "critical",
    "html": "<a tabindex=\"0\" id=\"toggle\" aria-pressed=\"false\">\n          Mute\n          <svg aria-hidden=\"true\" focusable=\"false\">\n            <use xlink:href=\"#icon-sound\"></use>\n          </svg>\n        </a>",
    "target": [
        "#toggle"
    ],
    "failureSummary": "Fix any of the following:\n  ARIA attribute is not allowed: aria-pressed=\"false\""
}

straker and others added 2 commits January 11, 2022 09:50
Co-authored-by: Wilco Fiers <WilcoFiers@users.noreply.github.com>
@straker straker merged commit fb5d990 into develop Jan 13, 2022
@straker straker deleted the aria-allowed-custom-elms branch January 13, 2022 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants