Open
Description
I want to be able to prohibit the usage of certain values of some dom attributes.
In my case I do not want the other developers in my project to use the listbox aria-role because of its accessibility issues. They should use lists of buttons instead.
This should be invalid
<div role="listbox">
But I do not want to completely forbid the usage of the role attribute, so something like this should be valid
<div role="list">
So I want to be able to configure a rule like the following:
{
"forbid-dom-props": {
"forbid": [{
"propName": "role",
"valueRegex": "^listbox$",
"message": "Please do not use listbox. You can use list of buttons instead"
}]
}
}
Metadata
Assignees
Labels
No labels