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

Determining interactivity returning different results with latest version of aria-query #8728

Closed
benmccann opened this issue Jun 13, 2023 · 1 comment

Comments

@benmccann
Copy link
Member

benmccann commented Jun 13, 2023

Describe the bug

#8724 removed four tests that started failing with the upgrade of aria-query and axobject-query and added four TODOs

elementRoles from aria-query used to contain:

  { constraints: [ 'descendant of table' ], name: 'td' },
  { attributes: [ { name: 'role', value: 'gridcell' } ], name: 'td' }

But after #8724 it contains:

  {
    constraints: [ 'ancestor table element has table role' ],
    name: 'td'
  },
  {
    constraints: [ 'ancestor table element has grid role' ],
    name: 'td'
  }

This gives different results when element_interactivity calls match_schema because of the presence/absence of attributes:

https://github.com/sveltejs/svelte/blob/d6f0b7bd5bacbe3ab2aae8dc43a6313cbf42b99a/packages/svelte/src/compiler/compile/utils/a11y.js#LL157C13-L157C13

Reproduction

import { elementRoles } from 'aria-query';
console.log(elementRoles.keys().filter((schema) => schema.name === 'td'))

Logs

No response

System Info

`aria-query` 5.1.3 and 5.2.1

Severity

annoyance

@benmccann
Copy link
Member Author

We may have to tweak the definition of non_interactive_roles:

const non_interactive_roles = new Set(

See what estlint-plugin-jsx-a11y is doing: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/pull/937/files#diff-ec009a063d49adb9e66f5416f3471033cad68f30bd658123e361b04c025fcbd8R34

dummdidumm added a commit that referenced this issue Jun 19, 2023
closes #8728
Turns out all the removed previous test failures are indeed correct to be removed, according to the test adjustments in jsx-eslint/eslint-plugin-jsx-a11y#937
dummdidumm added a commit that referenced this issue Jun 19, 2023
closes #8728
Turns out all the removed previous test failures are indeed correct to be removed, according to the test adjustments in jsx-eslint/eslint-plugin-jsx-a11y#937
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants