dequelabs / axe-core

Accessibility engine for automated Web UI testing
https://www.deque.com/axe/
Mozilla Public License 2.0
5.87k stars 763 forks source link

Rule 'dlitem' does not match 'definition-list' #3587

Open aardrian opened 2 years ago

aardrian commented 2 years ago

Product: axe-core 4.4.2

Rule: dlitem

Expectation: The content under the "Why it Matters", "Rule Description", and "The Algorithm (in simple terms)" headings should reflect the guidance in definition-list (<dl> elements must only directly contain properly-ordered <dt> and <dd> groups, <script>, or <template> elements). Namely that a <dt> and <dd> must have a <dl> as an ancestor (or have a parent of a <script>, <template>, or <div> whose parent, in turn, is <dl>).

Actual: The content under the "Why it Matters" heading reads:

A definition list item must be wrapped in parent dl elements, otherwise it will be invalid.

A definition list must follow a specific hierarchy. A list is defined using the dl element. What follows are alternating sets of dt and dd elements, starting with the dt element. dt elements define a term while dd elements denote a term's description. Each set of dt elements must have a corresponding set of dd elements. Only dt and dd elements are allowed in definition list. If this hierarchy is not followed, the list will be invalid.

The content under the "Rule Description" heading reads:

Definition list items (dt and/or dd) must be wrapped in parent dl elements to be valid. This enables screen reader users to understand the proper hierarchy of information in the list.

The content under the "The Algorithm (in simple terms)" heading reads:

Ensures that all child dd and dt elements have a dl as a parent.

Motivation: The language of rule dlitem is in conflict with the spec and axe rule definition-list. This is confusing devs. It may also be contributing to confusion with https://a11y-automation.dev/violations/valid-dl-elements/, even though it references the correct rule.

aardrian commented 2 years ago

Unrelated, I filed two issues today and got an email for each one that said this:

Subject: [dequelabs/axe-core] Run failed: Auto assign axe-core integration issues to Axe API team project board - develop ( 3618f50 )

[dequelabs/axe-core] Auto assign axe-core integration issues to Axe API team project board workflow run

Auto assign axe-core integration issues to Axe API team project board: All jobs have failed

Auto assign axe-core integration issues to Axe API team project board / Auto assign axe-core integration issues to Axe API team project board Failed in 9 seconds

WilcoFiers commented 2 years ago

Agreed, these pages are out of date. Thanks for raising this Adrian.