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

AXE Violation: aria-describedby (should not be present unless tooltip is active) #5089

Closed
carmanchris31 opened this issue Mar 4, 2019 · 2 comments · Fixed by #5614
Closed

Comments

@carmanchris31
Copy link

Bug description or feature request:

aria-describedby attribute should only be present when tooltip is shown, otherwise the attribute is considered invalid since the referenced id doesn't exist on the page (aXe violation):
screen shot 2019-03-04 at 11 01 58 am

On the Bootstrap doc/demo page you can see the expected behavior:
bootstrap-tooltip

We should hopefully just be able to conditionalize the attribute by whether the tooltip is shown, something like this:

@HostBinding('attr.aria-describedby') ariaDescribedby = this._tooltip.isShown ? `tooltip-${this.tooltipId}` : null;

Original:

@HostBinding('attr.aria-describedby') ariaDescribedby = `tooltip-${this.tooltipId}`;

Plunker/StackBlitz that reproduces the issue:

https://stackblitz.com/edit/ngx-bootstrap-vanaus?file=app%2Fapp.component.html

(aXe extension for reference: https://chrome.google.com/webstore/detail/axe/lhdoppojpmngadmnindnejefpokejbdd)

Versions of ngx-bootstrap, Angular, and Bootstrap:

ngx-bootstrap:
3.3.0 (since v3.1.4 commit)

Angular:
7 (but not dependent on angular version)

Bootstrap:
n/a

@Totati
Copy link

Totati commented Nov 26, 2019

I came here facing the same issue. The material team chose to leave a copy of the tooltip's content in the DOM, referring to that id.

@shainanigans
Copy link

Same issue here as well. @ludmilanesvitiy , I see this had an enhancement label added to it back in March. Has any progress been made on this?

@IraErshova IraErshova self-assigned this Jan 22, 2020
@IraErshova IraErshova added the WIP label Jan 22, 2020
IraErshova added a commit to IraErshova/ngx-bootstrap that referenced this issue Jan 23, 2020
Hide aria describedby attribute on hidden tooltip
Fix tooltip id attribute

Close valor-software#5089
daniloff200 added a commit that referenced this issue Jan 24, 2020
Hide aria describedby attribute on hidden tooltip
Fix tooltip id attribute

Close #5089

Co-authored-by: Dmitriy Danilov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants