-
Notifications
You must be signed in to change notification settings - Fork 747
Missing role attributes in Core 5.6.1 #6525
Comments
We use AOM aria properties within the components. Are you using Jest or JSDom? It could be they don't support AOM |
We have been working on moving away from overriding properties on the native HTMLElement prototype since it can cause unexpected behaviors in some browsers as well as performance issues. Some web component tools actively try to prevent this https://github.com/ionic-team/stencil/blob/main/src/compiler/transformers/reserved-public-members.ts |
Good to know, thank you! |
I filed an issue again jsdom to support the AOM properties: jsdom/jsdom#3323 We have a polyfill that will fall back to |
Fixes vmware-archive#5985 - Add isNode check to property syncing in cdscontrol. Fixes vmware-archive#6525: - Initialize role properties in connectedCallback. - Remove isNode check for aria-reflect. Fixes Signed-off-by: Ashley Ryan <[email protected]>
Fixes vmware-archive#5985 - Add isNode check to property syncing in cdscontrol. Fixes vmware-archive#6525: - Initialize role properties in connectedCallback. - Remove isNode check for aria-reflect. Signed-off-by: Ashley Ryan <[email protected]>
Fixes vmware#5985 - Add isNode check to property syncing in cdscontrol. Fixes vmware#6525: - Remove isNode check for aria-reflect, now that all roles are set in connectedCallback Signed-off-by: Ashley Ryan <[email protected]>
Fixes vmware#5985 - Add isNode check to property syncing in cdscontrol. Fixes vmware#6525: - Remove isNode check for aria-reflect, now that all roles are set in connectedCallback Signed-off-by: Ashley Ryan <[email protected]>
Fixes vmware#5985 - Add isNode check to property syncing in cdscontrol. Fixes vmware#6525: - Remove isNode check for aria-reflect, now that all roles are set in connectedCallback Signed-off-by: Ashley Ryan <[email protected]>
Fixes vmware#5985 - Add isNode check to property syncing in cdscontrol. Fixes vmware#6525: - Remove isNode check for aria-reflect, now that all roles are set in connectedCallback Signed-off-by: Ashley Ryan <[email protected]>
Fixes vmware#5985 - Add isNode check to property syncing in cdscontrol. Fixes vmware#6525: - Remove isNode check for aria-reflect, now that all roles are set in connectedCallback Signed-off-by: Ashley Ryan <[email protected]>
Fixes #5985 - Add isNode check to property syncing in cdscontrol. Fixes #6525: - Remove isNode check for aria-reflect, now that all roles are set in connectedCallback Signed-off-by: Ashley Ryan <[email protected]>
Fixes vmware#5985 - Add isNode check to property syncing in cdscontrol. Fixes vmware#6525: - Remove isNode check for aria-reflect, now that all roles are set in connectedCallback Signed-off-by: Ashley Ryan <[email protected]>
Fixes vmware#5985 - Add isNode check to property syncing in cdscontrol. Fixes vmware#6525: - Remove isNode check for aria-reflect, now that all roles are set in connectedCallback Signed-off-by: Ashley Ryan <[email protected]>
Fixes vmware#5985 - Add isNode check to property syncing in cdscontrol. Fixes vmware#6525: - Remove isNode check for aria-reflect, now that all roles are set in connectedCallback Signed-off-by: Ashley Ryan <[email protected]>
Fixes vmware#5985 - Add isNode check to property syncing in cdscontrol. Fixes vmware#6525: - Remove isNode check for aria-reflect, now that all roles are set in connectedCallback Signed-off-by: Ashley Ryan <[email protected]>
Hi there 👋, this is an automated message. To help Clarity keep track of discussions, we automatically lock closed issues after 14 days. Please look for another open issue or open a new issue with updated details and reference this one as necessary. |
Describe the bug
ARIA roles and attributes are missing in Clarity Core v5.6.1, failing our React Testing Library tests that use
await screen.findByRole('button')
.How to reproduce
Steps to reproduce the behavior:
yarn install
)yarn test
on themain
branch and see the error in the console outputcore-5.6.0
branch, install dependencies again (yarn install
), and runyarn test
to see the same tests passHere is the error output on v5.6.1:
As you can tell, the
cds-button
element is missing therole
attribute (and thearia-disabled
one).I suspect the issue originated at v5.6.0...v5.6.1#diff-40c8e7c2cb3e2e864efc9529dbba5def804aa9131b0ab70c82fb87cfc86aba00
(warning: GitHub's renderer currently removes the # between
v5.6.1
anddiff
in this URL 🤷♂️)Expected behavior
The
core-5.6.0
contains the expected behavior. When running tests, we get:Versions
Clarity project:
Clarity version:
Framework:
Additional notes
To be noted that the role does appear fine in the browser but not in the test DOM, not sure what kind of magic is happening there:
The text was updated successfully, but these errors were encountered: