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

Violation of 4.1.1, if with ARIA syntax is correct? #2135

Closed
JAWS-test opened this issue Nov 15, 2021 · 3 comments
Closed

Violation of 4.1.1, if with ARIA syntax is correct? #2135

JAWS-test opened this issue Nov 15, 2021 · 3 comments

Comments

@JAWS-test
Copy link

The following code is syntactically incorrect (according to the W3C validator), thus a violation of SC 4.1.1, but not incorrect per se due to the ARIA markup.

<ul>
  <div role=listitem></div>
</ul>

listitem is equivalent to <li>. Should this still be considered a violation of 4.1.1 - and if so: why?

@mraccess77
Copy link

I'm not sure I would consider it a 4.1.1 violation - but I'd like to others opinions as well.

@cstrobbe
Copy link

cstrobbe commented Jun 16, 2022

When WCAG 2.0 was in its final year of development, development of WAI-ARIA had already started, with a first public draft of WAI-ARIA published in February 2008. At the time, it was impossible to use WAI-ARIA attributes in HTML (still HTML 4.01 at the time) or XHTML without causing validation errors. (This changed later when HTML 5 drafts began to explicitly address the inclusion of WAI-ARIA attributes in HTML documents.)

It was never WCAG's intention to prohibit the use of WAI-ARIA attributes by means of the wording of SC 4.1.1. For this reason, there is nothing in the SC that prohibits custom attributes.

The code snippet from the original issue does not contain anything that violates SC 4.1.1, neither at the level of element nesting (but that's a separate discussion), nor at the level of attribute syntax:

<ul>
  <div role=listitem></div>
</ul>

See also @patrickhlauke / Patrick Lauke's comment on "4.1.1 Parsing - Exception for custom attributes other than data-*?". Based on that, it seems to me that the current issue can be closed.

@fstrr
Copy link
Contributor

fstrr commented May 10, 2024

This issue looks like it can be closed. If it needs to be re-opened, please do that and convert it to a Discussion.

@fstrr fstrr closed this as completed May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants