-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix: added missing accessibility labels for pagination elements #21051
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
fix: added missing accessibility labels for pagination elements #21051
Conversation
|
All contributors have signed the DCO. |
|
I have read the DCO document and I hereby sign the DCO. |
✅ Deploy Preview for v11-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #21051 +/- ##
==========================================
- Coverage 92.60% 92.59% -0.01%
==========================================
Files 515 515
Lines 38220 38222 +2
Branches 5861 5865 +4
==========================================
+ Hits 35392 35393 +1
- Misses 2678 2679 +1
Partials 150 150
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| ?disabled="${disabled}" | ||
| tabindex="${tabIndex}" | ||
| type="${ifDefined(type)}" | ||
| aria-label="${ifDefined(tooltipText) ?? ''}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| aria-label="${ifDefined(tooltipText) ?? ''}" | |
| aria-label="${ifDefined(tooltipText)}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of always setting aria-label="${ifDefined(tooltipText) ?? ''}", we can omit the attribute when no tooltip text exists. The previous version left an empty aria-label="" on every non-tooltip button, which overrides any text content and strips the accessible name. With ifDefined(tooltipText) alone, pagination buttons still get their tooltip text as the label, while regular buttons fall back to the default label behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed! Have addressed this change
2nikhiltom
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for following up
DCO check is still failing. looks like there are 2 different account, try signing off the DCO with that account as well
Hi @2nikhiltom that second account is not mine, not sure how but it seems like it picked up someone else's account |
|
Can you please remove my email id from this thread? I have nothing to with
this repo
…On Mon, Nov 24, 2025 at 1:30 PM grishma-shah7 ***@***.***> wrote:
*grishma-shah7* left a comment (carbon-design-system/carbon#21051)
<#21051 (comment)>
LGTM, thanks for following up DCO check is still failing. looks like there
are 2 different account, try signing off the DCO with that account as well
Hi @2nikhiltom <https://github.com/2nikhiltom> that second account is not
mine, not sure how but it seems like it picked up someone else's account
Can we do something for it, or would I need to create a new PR?
—
Reply to this email directly, view it on GitHub
<#21051 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAL7LZP4RCJZ6UYEQPW7TUL36K3IZAVCNFSM6AAAAACMRVOTVCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKNRZGM4TKMRSGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
…stem#21036) Co-authored-by: Gururaj J <[email protected]> Co-authored-by: Heloise Lui <[email protected]>
…sign-system#20863 (carbon-design-system#21048) * feat(dropdown): reintroduce parity changes from reverted PR carbon-design-system#20863 * fix(multi-select): ensure input reflects aria-expanded state
…n-system#21044) * chore(styles): update sass api for web component builds * chore(styles): update deprecated type-of() in theme --------- Co-authored-by: Gururaj J <[email protected]> Co-authored-by: Heloise Lui <[email protected]>
eea99ce to
c9617f5
Compare
heloiselui
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
b486103

Closes #20042
This PR includes:
Issue was that in web-components
buttoncomponent, we have a condition that if tooltipText is present AND the button is not disabled, we show the aria label. Otherwise it is missing. Issue comes up on pagination component, it uses the button with the tooltipText present, but when on page#1 the previous page button is disabled and hence there is no label associated with it. For the fix, we'll check if tooltipText is present, use that text as aria-label, otherwise keep as emptyBefore:

After:

titleattribute missing onselectcomponent on paginationTo match the react component version, where the pagination select component has
titleattribute added as the value of the dropdown, have added the same for the web component select componentReact:

Web-component before:

Web-component after:

Changelog
New
Changed
Removed
Testing / Reviewing
{{ Add steps or a checklist for how reviewers can verify this PR works or not }}
PR Checklist
As the author of this PR, before marking ready for review, confirm you:
More details can be found in the pull request guide