Skip to content
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

feat(aria/lookupTable, aria-allowed-attr): deprecate aria.lookupTable and passing allowed attributes to aria-allowed-attr #2395

Merged
merged 2 commits into from
Jul 20, 2020

Conversation

straker
Copy link
Contributor

@straker straker commented Jul 17, 2020

This pr officially closes #2108 as it removes all lookup table references in our codebase expect where we still need it (mostly for implicitNodes which is deprecated as well and keeping lookupTable as a public API).

I noticed the aria-allowed-attr test still used the lookup table to configure the options test, which shouldn't have worked. Digging further I found multiple things wrong with that test that would cause it to never fail.

First, without mccheddarton being configured into the standards object, the check would always pass as there was no allowed role data for an invalid role. Second, since aria-snuggles was not configured into the standards object, it would not be counted as a valid attribute so wouldn't fail on it either. Lastly, even if those were configured, since we pass the options to force the allowed attrs the test could never fail.

So to fix it I added an assert that proved that without the options the check should fail, which requires properly configured standards.

I also deprecated the options to ara-allowed-attrs as we had done with aria-required-attrs, and refactored the code while I was there to not use var.

Closes issue: #2108

Reviewer checks

Required fields, to be filled out by PR reviewer(s)

  • Follows the commit message policy, appropriate for next version
  • Code is reviewed for security

@straker straker requested a review from a team as a code owner July 17, 2020 17:18
@straker straker merged commit 739d1b1 into develop Jul 20, 2020
@straker straker deleted the deprecate-lookuptable branch July 20, 2020 12:54
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.

Make global ARIA attributes configurable in aria-allowed-attr
2 participants