Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(commons): Add matches methods (#1270)
This PR adds a series of "matches" functions to axe.commons.matches. These functions are designed to allow us to match elements on different types of things. We started doing this for the aria-allowed-role rule, but while working on the accessible name computation I found myself building a very similar thing. This PR replaces the existing `aria.validateNodeAndAttributes` with a more general purpose axe.commons.matches function. **Note**, I realise there is a bunch more refactoring that needs to happen. I'd prefer to keep that out of this PR, so that we can get the accessible name PR resolved. **Note** This PR removes a commons that was introduced in 3.1.0. This is a **breaking change**. I do not think this will impact anyone, and so I didn't put in the time to put some deprecation thing around it, but if anyone thinks this is necessary I can put that in. This PR is a prerequisite for #1163 Closes issue: none. ## Reviewer checks **Required fields, to be filled out by PR reviewer(s)** - [x] Follows the commit message policy, appropriate for next version - [x] Has documentation updated, a DU ticket, or requires no documentation change - [x] Includes new tests, or was unnecessary - [x] Code is reviewed for security by: @JKODU
- Loading branch information