Skip to content

fix: improve TabPane accessibility and content handling#52856

Merged
thinkasany merged 1 commit intoant-design:nextfrom
aojunhao123:fix-tabs-empty
Feb 18, 2025
Merged

fix: improve TabPane accessibility and content handling#52856
thinkasany merged 1 commit intoant-design:nextfrom
aojunhao123:fix-tabs-empty

Conversation

@aojunhao123
Copy link
Contributor

🤔 This is a ...

  • 🐞 Bug fix

🔗 Related Issues

💡 Background and Solution

📝 Change Log

Language Changelog
🇺🇸 English 🐛 Fix focus behavior for empty TabPane to improve accessibility
🇨🇳 Chinese 🐛 修复空内容 TabPane 的焦点行为,提升无障碍体验

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 17, 2025

Preview is ready

@github-actions
Copy link
Contributor

github-actions bot commented Feb 17, 2025

👁 Visual Regression Report for PR #52856 Passed ✅

🎯 Target branch: next (2dbeb54)
📖 View Full Report ↗︎
📖 Alternative Report ↗︎

🎊 Congrats! No visual-regression diff found.

@petercat-assistant
Copy link

Walkthrough

This pull request addresses a bug fix to improve accessibility in the TabPane component by fixing the focus behavior for empty TabPanes. It updates the dependency version of @rc-component/tabs from ~1.0.0 to ~1.1.0 to incorporate these changes.

Changes

Files Summary
components/card/tests/snapshots/demo-extend.test.ts.snap, components/card/tests/snapshots/demo.test.ts.snap Updated snapshot tests with 3 additions and 3 deletions each.
components/card/tests/snapshots/index.test.tsx.snap Updated snapshot test with 1 addition and 1 deletion.
components/config-provider/tests/snapshots/components.test.tsx.snap, components/tabs/tests/snapshots/index.test.tsx.snap Updated snapshot tests with 7 additions and 7 deletions each.
package.json Updated @rc-component/tabs dependency version from ~1.0.0 to ~1.1.0.
🪧 Tips For further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me.

"@rc-component/switch": "~1.0.0",
"@rc-component/table": "~1.0.2",
"@rc-component/tabs": "~1.0.0",
"@rc-component/tabs": "~1.1.0",

Choose a reason for hiding this comment

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

Ensure that the update to @rc-component/tabs version ~1.1.0 does not introduce any breaking changes or regressions in the application. This update should be tested thoroughly to confirm compatibility with existing functionality.

@socket-security
Copy link

New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/regenerator-runtime@0.14.1 None 0 27.9 kB benjamn
npm/typescript@5.7.3 None 0 22.7 MB typescript-bot

🚮 Removed packages: npm/@ant-design/colors@7.2.0, npm/@ant-design/compatible@5.1.4, npm/@ant-design/cssinjs-utils@1.1.3, npm/@ant-design/cssinjs@1.23.0, npm/@ant-design/fast-color@2.0.6, npm/@ant-design/happy-work-theme@1.0.0, npm/@ant-design/icons@5.6.1, npm/@ant-design/react-slick@1.1.2, npm/@ant-design/tools@18.0.3, npm/@ant-design/v5-patch-for-react-19@1.0.3, npm/@antfu/eslint-config@4.2.1, npm/@antv/g6@4.8.24, npm/@babel/runtime@7.26.9, npm/@biomejs/biome@1.9.4, npm/@codecov/webpack-plugin@1.9.0, npm/@codesandbox/sandpack-react@2.20.0, npm/@dnd-kit/core@6.3.1, npm/@dnd-kit/modifiers@9.0.0, npm/@dnd-kit/sortable@10.0.0, npm/@dnd-kit/utilities@3.2.2, npm/@emotion/css@11.13.5, npm/@emotion/react@11.14.0, npm/@emotion/server@11.11.0, npm/@eslint-react/eslint-plugin@1.26.2, npm/@ianvs/prettier-plugin-sort-imports@4.4.1, npm/@inquirer/prompts@7.3.2, npm/@madccc/duplicate-package-checker-webpack-plugin@1.0.0, npm/@microflash/rehype-figure@2.1.3, npm/@npmcli/run-script@9.0.2, npm/@octokit/rest@21.1.1, npm/@qixian.cs/github-contributors-list@2.0.2, npm/@rc-component/collapse@1.0.1, npm/@rc-component/color-picker@2.0.1, npm/@rc-component/dialog@1.1.0, npm/@rc-component/form@1.0.0, npm/@rc-component/mutate-observer@2.0.0, npm/@rc-component/qrcode@1.0.0, npm/@rc-component/segmented@1.1.0, npm/@rc-component/switch@1.0.0, npm/@rc-component/table@1.0.2, npm/@rc-component/tabs@1.0.0, npm/@rc-component/tooltip@1.0.0, npm/@rc-component/tour@1.15.1, npm/@rc-component/trigger@2.2.6, npm/@rc-component/util@1.2.1, npm/@size-limit/file@11.1.6, npm/@stackblitz/sdk@1.11.0, npm/@testing-library/dom@10.4.0, npm/@testing-library/jest-dom@6.6.3, npm/@testing-library/react@16.2.0, npm/@testing-library/user-event@14.6.1, npm/@types/adm-zip@0.5.7, npm/@types/ali-oss@6.16.11, npm/@types/cli-progress@3.11.6, npm/@types/fs-extra@11.0.4, npm/@types/gtag.js@0.0.20, npm/@types/http-server@0.12.4, npm/@types/isomorphic-fetch@0.0.39, npm/@types/jest-axe@3.5.9, npm/@types/jest-environment-puppeteer@5.0.6, npm/@types/jest-image-snapshot@6.4.0, npm/@types/jest@29.5.14, npm/@types/jquery@3.5.32, npm/@types/jsdom@21.1.7, npm/@types/minimist@1.2.5, npm/@types/node@22.13.4, npm/@types/nprogress@0.2.3, npm/@types/pixelmatch@5.2.6, npm/@types/pngjs@6.0.5, npm/@types/prismjs@1.26.5, npm/@types/progress@2.0.7, npm/@types/react-copy-to-clipboard@5.0.7, npm/@types/react-dom@19.0.4, npm/@types/react-highlight-words@0.20.0, npm/@types/react-resizable@3.0.8, npm/@types/react@19.0.10, npm/@types/semver@7.5.8, npm/@types/spinnies@0.5.3, npm/@types/tar@6.1.13, npm/@types/throttle-debounce@5.0.2, npm/@types/warning@3.0.3, npm/adm-zip@0.5.16, npm/ali-oss@6.22.0, npm/antd-img-crop@4.24.0, npm/antd-style@3.7.1, npm/antd-token-previewer@2.0.8, npm/axios@1.7.9, npm/chalk@5.4.1, npm/cheerio@1.0.0, npm/circular-dependency-plugin@5.2.2, npm/classnames@2.5.1, npm/cli-progress@3.12.0, npm/copy-to-clipboard@3.3.3, npm/cross-env@7.0.3, npm/cross-fetch@4.1.0, npm/cypress-image-diff-html-report@2.2.0, npm/dekko@0.2.1, npm/dumi-plugin-color-chunk@1.1.2, npm/dumi@2.4.18, npm/env-paths@3.0.0, npm/eslint-plugin-compat@6.0.2, npm/eslint-plugin-jest@28.11.0, npm/eslint-plugin-jsx-a11y@6.10.2, npm/eslint-plugin-react-hooks@5.2.0-canary-ff628334-20250205, npm/eslint-plugin-react-refresh@0.4.19, npm/eslint@9.20.1, npm/fast-glob@3.3.3, npm/fetch-jsonp@1.3.0, npm/fs-extra@11.3.0, npm/gh-pages@6.3.0, npm/glob@11.0.1, npm/html2sketch@1.0.2, npm/http-server@14.1.1, npm/husky@9.1.7, npm/identity-obj-proxy@3.0.0, npm/immer@10.1.1, npm/is-ci@4.1.0, npm/isomorphic-fetch@3.0.0, npm/jest-axe@9.0.0, npm/jest-canvas-mock@2.5.2, npm/jest-environment-jsdom@29.7.0, npm/jest-environment-node@29.7.0, npm/jest-image-snapshot@6.4.0, npm/jest-puppeteer@11.0.0, npm/jest@29.7.0, npm/jquery@3.7.1, npm/jsdom@26.0.0, npm/jsonml-to-react-element@1.1.11, npm/jsonml.js@0.1.0, npm/lint-staged@15.4.3, npm/lunar-typescript@1.7.7, npm/lz-string@1.5.0, npm/mockdate@3.0.5, npm/node-fetch@3.3.2, npm/node-notifier@10.0.1, npm/open@10.1.0, npm/ora@8.2.0, npm/p-all@5.0.0, npm/package-manager-detector@0.2.9, npm/pixelmatch@6.0.0, npm/prettier@3.5.1, npm/pretty-format@29.7.0, npm/prismjs@1.29.0, npm/puppeteer@24.2.1, npm/qs@6.14.0, npm/rc-cascader@3.33.0, npm/rc-checkbox@3.5.0, npm/rc-drawer@8.0.0, npm/rc-dropdown@4.2.1, npm/rc-image@7.11.0, npm/rc-input-number@9.4.0, npm/rc-input@1.7.2, npm/rc-mentions@2.19.1, npm/rc-menu@9.16.0, npm/rc-motion@2.9.5, npm/rc-notification@5.6.3, npm/rc-pagination@5.1.0, npm/rc-picker@4.11.2, npm/rc-progress@4.0.0, npm/rc-rate@2.13.1, npm/rc-resize-observer@1.4.3, npm/rc-select@14.16.6, npm/rc-slider@11.1.8, npm/rc-steps@6.0.1, npm/rc-textarea@1.9.0, npm/rc-tree-select@5.27.0, npm/rc-tree@5.13.0, npm/rc-upload@4.8.1, npm/rc-util@5.44.4, npm/react-dom@19.0.0, npm/scroll-into-view-if-needed@3.1.0, npm/throttle-debounce@5.0.2

View full report↗︎

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 17, 2025

@codecov
Copy link

codecov bot commented Feb 17, 2025

Bundle Report

Changes will increase total bundle size by 338 bytes (0.01%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
antd.min-array-push 3.75MB 338 bytes (0.01%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: antd.min-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
antd-with-locales.min.js 169 bytes 2.03MB 0.01%
antd.min.js 169 bytes 1.72MB 0.01%

@codecov
Copy link

codecov bot commented Feb 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (2dbeb54) to head (58ec3a8).
Report is 1 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff            @@
##              next    #52856   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          765       765           
  Lines        13803     13803           
  Branches      3620      3620           
=========================================
  Hits         13803     13803           

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

@thinkasany thinkasany merged commit ed9a458 into ant-design:next Feb 18, 2025
40 checks passed
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 this pull request may close these issues.

2 participants