equal-access icon indicating copy to clipboard operation
equal-access copied to clipboard

Distinguish "aria_semantics" and "aria_rule_redundant" rules to reduce rule overlapping

Open shunguoy opened this issue 2 years ago • 0 comments

The rule messages for the two rules are clearly different, however, the help contents are not. This causes two rules to be not distinguished enough, and with overlapping.

group messages: aria_semantics: ARIA roles must be valid for the element to which they are assigned aria_rule_redundant: An explicitly-assigned ARIA role should not be redundant with the implicit role of the element

Main help content: aria_semantics: "Some HTML elements or attributes have native semantics that map, by default, to implied ARIA semantics. For predictable interaction and behavior of UI controls, these implicit semantics should only be overridden".
aria_rule_redundant: "A best practice is to avoid adding an ARIA explicit role to an HTML element whose implicit role has the identical semantic meaning. This will eliminate the extra browser processing to determine the role of the element to add to the DOM".

Rule logic: . contains overlapped checking. If the aria_role_redundant is checked, then the aria_semantic should be skipped.

shunguoy avatar Jun 23 '22 14:06 shunguoy