CLI: Fix React native web A11y issues#33937
Conversation
|
View your CI Pipeline Execution ↗ for commit af68e35
☁️ Nx Cloud last updated this comment at |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughColor and decoration style updates in React Native Web Vite template files: primary Button color changed, secondary Button text color added, link color changed and underline added, and tip text color updated. No API, prop, or control flow changes. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes ✨ Finishing Touches
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@code/frameworks/react-native-web-vite/template/cli/js/Button.jsx`:
- Around line 41-42: Remove text-only properties from View/TouchableOpacity
style objects: delete fontWeight and lineHeight from styles.button and remove
color from styles.secondary because React Native applies those only to Text;
keep text formatting in styles.buttonText (which already contains the proper
fontWeight/lineHeight/color). Update the style definitions where styles.button,
styles.secondary are declared so only layout/background/border/padding/etc.
remain on View/TouachableOpacity and all text-related styling remains in
styles.buttonText.
In `@code/frameworks/react-native-web-vite/template/cli/ts/Button.tsx`:
- Around line 55-56: Move text-only style props currently applied to View styles
into the Text style: remove fontWeight and lineHeight from the button View style
and add them to the component's Text style (the Text style defined alongside the
Button styles), and remove color from the secondary View style and ensure that
color is defined on secondaryText instead (it already exists there—move/merge
the value). Update the StyleSheet entries for button, secondary, secondaryText
and the Text style accordingly so only ViewStyle props remain on Views and
TextStyle props on Text.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
code/frameworks/react-native-web-vite/template/cli/js/Button.jsxcode/frameworks/react-native-web-vite/template/cli/js/Page.jsxcode/frameworks/react-native-web-vite/template/cli/ts/Button.tsxcode/frameworks/react-native-web-vite/template/cli/ts/Page.tsx
CLI: Fix React native web A11y issues (cherry picked from commit 879400d)
Closes #33936
What I did
With this pull request, the examples provided with the React Native web framework were updated to fix the outstanding A11y issues.
What was done:
Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
N/A
Caution
This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!
Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal,ci:mergedorci:dailyGH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli-storybook/src/sandbox-templates.tsMake sure this PR contains one of the labels below:
Available labels
bug: Internal changes that fixes incorrect behavior.maintenance: User-facing maintenance tasks.dependencies: Upgrading (sometimes downgrading) dependencies.build: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup: Minor cleanup style change. Will not show up in release changelog.documentation: Documentation only changes. Will not show up in release changelog.feature request: Introducing a new feature.BREAKING CHANGE: Changes that break compatibility in some way with current major version.other: Changes that don't fit in the above categories.🦋 Canary release
This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the
@storybookjs/coreteam here.core team members can create a canary release here or locally with
gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>Summary by CodeRabbit