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

bind:offsetWidth causes accessibility failure #3948

Closed
blm-grainger opened this issue Nov 18, 2019 · 4 comments · Fixed by #3949
Closed

bind:offsetWidth causes accessibility failure #3948

blm-grainger opened this issue Nov 18, 2019 · 4 comments · Fixed by #3949

Comments

@blm-grainger
Copy link

Describe the bug
When using bind:offsetWidth on an element, an element is added to the dom, but does not include any accessibility information.

To Reproduce
Add bind:offsetWidth to any element

Expected behavior
The element should be rendered in an accessible way. Likely the most desirable behavior is to render the element with role="none". Here's the failure message I'm getting

Element does not have text that is visible to screen readers
aria-label attribute does not exist or is empty
aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
Element has no title attribute or the title attribute is empty
Element's default semantics were not overridden with role="presentation"
Element's default semantics were not overridden with role="none""

Severity
We will still use svelte, but it will likely cause us to not use the feature, which is highly annoying. ;)

@pngwn
Copy link
Member

pngwn commented Nov 18, 2019

Good catch.

Would aria-hidden=true be better here? That would remove it completely from the accessibility API while role=none will expose it but remove any semantic meaning.

@blm-grainger
Copy link
Author

Ahh yeah. I agree. That seems like the better solution. Thanks!

pngwn added a commit to pngwn/svelte that referenced this issue Nov 18, 2019
pngwn added a commit to pngwn/svelte that referenced this issue Nov 18, 2019
@pngwn
Copy link
Member

pngwn commented Nov 18, 2019

Awesome, thanks for the report.

pngwn added a commit to pngwn/svelte that referenced this issue Nov 18, 2019
pngwn added a commit to pngwn/svelte that referenced this issue Nov 18, 2019
pngwn added a commit to pngwn/svelte that referenced this issue Nov 18, 2019
@pngwn pngwn reopened this Nov 18, 2019
@pngwn
Copy link
Member

pngwn commented Nov 18, 2019

Let’s keep this open till it is dealt with.

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

Successfully merging a pull request may close this issue.

2 participants