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

Remove redundant visually hidden "(current)" from pagination controls #3870

Closed
ihorzenich opened this issue Oct 15, 2020 · 1 comment · Fixed by #4492
Closed

Remove redundant visually hidden "(current)" from pagination controls #3870

ihorzenich opened this issue Oct 15, 2020 · 1 comment · Fixed by #4492

Comments

@ihorzenich
Copy link

TL;DR - Remove the <span class="visually-hidden">(current)</span> where the controls already have aria-current

Bug description:

Keeping <span class="sr-only">(current)</span> together with aria-current="page" on parent block cause double announcement of "current" page in NVDA screen-reader.
image
It is necessary to remove <span class="sr-only">(current)</span> from ngb-pagination.

This has already been done in Bootstrap: twbs/bootstrap#31892
I think ng-bootstrap pagination should also be in line with this.

Link to minimally-working StackBlitz that reproduces the issue:

https://ng-bootstrap.github.io/stackblitzes/pagination/basic/stackblitz.html

Versions of Angular, ng-bootstrap and Bootstrap:

Angular: 10.0.0
ng-bootstrap: 7.0.0
Bootstrap: 4.5.4

@RahulBavaliya
Copy link

You can use below css code for hidding this span tag

:host ::ng-deep .pagination > li.page-item.active > a.page-link > span {
    display: none;
}

@maxokorokov maxokorokov modified the milestones: 14.2.0, 14.1.1 Apr 13, 2023
maxokorokov added a commit to maxokorokov/ng-bootstrap that referenced this issue Apr 13, 2023
Not necessary to have them since `aria-current` was introduced

Fixes ng-bootstrap#3870
maxokorokov added a commit that referenced this issue Apr 13, 2023
Not necessary to have them since `aria-current` was introduced

Fixes #3870
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.

3 participants