Skip to content

Conversation

@grishma-shah7
Copy link
Contributor

Closes #20042

This PR includes:

  1. bug fix for pagination button where aria label was not being set correctly due to condition.
    Issue was that in web-components button component, 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 empty

Before:
Screenshot 2025-11-19 at 3 12 36 PM

After:
Screenshot 2025-11-19 at 3 12 53 PM

  1. title attribute missing on select component on pagination
    To match the react component version, where the pagination select component has title attribute added as the value of the dropdown, have added the same for the web component select component

React:
Screenshot 2025-11-19 at 3 09 42 PM

Web-component before:
Screenshot 2025-11-19 at 3 11 22 PM

Web-component after:
Screenshot 2025-11-19 at 3 11 59 PM

Changelog

New

  • {{new thing}}

Changed

  • {{changed thing}}

Removed

  • {{removed thing}}

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:

  • Reviewed every line of the diff
  • Updated documentation and storybook examples
  • Wrote passing tests that cover this change
  • Addressed any impact on accessibility (a11y)
  • Tested for cross-browser consistency
  • Validated that this code is ready for review and status checks should pass

More details can be found in the pull request guide

@grishma-shah7 grishma-shah7 requested a review from a team as a code owner November 19, 2025 09:44
@github-actions
Copy link
Contributor

github-actions bot commented Nov 19, 2025

All contributors have signed the DCO.
Posted by the DCO Assistant Lite bot.

@grishma-shah7
Copy link
Contributor Author

I have read the DCO document and I hereby sign the DCO.

@netlify
Copy link

netlify bot commented Nov 19, 2025

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit 38a39a7
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-web-components/deploys/69242099ad652f0009495463
😎 Deploy Preview https://deploy-preview-21051--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Nov 19, 2025

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 38a39a7
🔍 Latest deploy log https://app.netlify.com/projects/carbon-elements/deploys/6924209956b27d000878a12a
😎 Deploy Preview https://deploy-preview-21051--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Nov 19, 2025

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 92897c3
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-react/deploys/691d917c327fd100087bfc42
😎 Deploy Preview https://deploy-preview-21051--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Nov 19, 2025

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 38a39a7
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-react/deploys/692420990d89fb00086b8ef7
😎 Deploy Preview https://deploy-preview-21051--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@heloiselui
Copy link
Contributor

Hey, the DCO check is failing. It looks like the commit was made with a different account, try signing off the DCO with that account as well.

image

@codecov
Copy link

codecov bot commented Nov 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.59%. Comparing base (19424c0) to head (38a39a7).
⚠️ Report is 2 commits behind head on main.

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              
Flag Coverage Δ
main-packages 85.61% <ø> (ø)
web-components 96.87% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

?disabled="${disabled}"
tabindex="${tabIndex}"
type="${ifDefined(type)}"
aria-label="${ifDefined(tooltipText) ?? ''}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
aria-label="${ifDefined(tooltipText) ?? ''}"
aria-label="${ifDefined(tooltipText)}"

Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor

@2nikhiltom 2nikhiltom left a 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

@grishma-shah7
Copy link
Contributor Author

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 we do something for it, or would I need to create a new PR?

@grishma
Copy link

grishma commented Nov 24, 2025 via email

@grishma-shah7 grishma-shah7 force-pushed the pagination-accessibility branch from eea99ce to c9617f5 Compare November 24, 2025 09:07
Copy link
Contributor

@heloiselui heloiselui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@heloiselui heloiselui added this pull request to the merge queue Nov 24, 2025
Merged via the queue into carbon-design-system:main with commit b486103 Nov 24, 2025
41 of 43 checks passed
@grishma-shah7 grishma-shah7 deleted the pagination-accessibility branch December 12, 2025 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[a11y]: Form control element has no associated label

6 participants