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

"ARIA required owned elements" (bc4a75): Passed example 3 is incorrect #1552

Closed
kasperisager opened this issue Mar 5, 2021 · 7 comments
Closed

Comments

@kasperisager
Copy link
Contributor

https://act-rules.github.io/testcases/bc4a75/c26f9f87576ea7fbeb2db67a559e78501d1d232a.html

<table role="grid">
	<tr role="row">
		<span role="cell">Item 1</span>
	</tr>
</table>

When parsed as HTML, the above turns into the following:

<span role="cell">Item 1</span>
<table role="grid">
  <tbody>
    <tr role="row"></tr>
  </tbody>
</table>

That code fails the rule due to the row missing a cell.

@kasperisager
Copy link
Contributor Author

I also couldn't help but notice that both SortSite, QualWeb, and axe-core pass that case. When I run axe-core directly against the test case, however, it does correctly fail, contrary to what's reported in the implementation data. QualWeb passes it for some reason.

@carlosapaduarte
Copy link
Member

carlosapaduarte commented Mar 10, 2021

@kasperisager the expectation reads "Each test target only owns elements with a semantic role from the required owned element list for the test target's semantic role."
The row does not own any element. The expectation checks that the owned elements have the required semantic role. Since there are no owned element, I would say the expectation is met.

So, I do think we need to update the expectation to require that the test target owns at least one element.

@kasperisager
Copy link
Contributor Author

@carlosapaduarte That's of course entirely correct! We've already implemented the bit about requiring at least one element in Alfa as per #1426 and I missed the fact that the published rule still doesn't include that change.

@WilcoFiers
Copy link
Member

I'm not so sure we should make them have required children TBH. Is there anything inaccessible about an empty row?

@kasperisager
Copy link
Contributor Author

Without it, I don't think the rule should exist at all: #1426 (comment)

@Jym77
Copy link
Collaborator

Jym77 commented Jan 25, 2022

We should probably only write examples that are correct DOM/HTML. So not an example like that is parsed into a DOM different from what the HTML looks like.

@Jym77
Copy link
Collaborator

Jym77 commented Jun 23, 2022

Closed by #1850.

@Jym77 Jym77 closed this as completed Jun 23, 2022
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

4 participants