feat: deprecate individual Text components and add default a11yRole for mobile title Text#401
Merged
haoruikun-cb merged 6 commits intocds-v9from Feb 20, 2026
Conversation
sverg-cb
reviewed
Feb 17, 2026
| /** @deprecated Use `Text` with `font="display1"` instead. This component will be removed in a future major release. */ | ||
| export const TextDisplay1 = memo( | ||
| forwardRef<NativeText, TextDisplay1Props>( | ||
| ({ accessibilityRole = 'header', font = 'display1', ...props }, ref) => ( |
Contributor
There was a problem hiding this comment.
All TextDisplayX and TextTitleX elements in mobile have a default a11y role of "header". For consumers that do not override the role themselves, there's a risk of a11y regression (or at least failing some a11y tests). Can we include something in the deprecation statements?
Contributor
Author
There was a problem hiding this comment.
Good point, let me double check and scan through if there is similar concerns elsewhere
Contributor
Author
There was a problem hiding this comment.
Updated the JSDoc so customers are aware of the a11y change
…prevent a11y regression
bcdea41 to
c269c8a
Compare
hcopp
reviewed
Feb 20, 2026
| )} | ||
| {!!endLabelProp && ( | ||
| <TextEndLabel color="fgMuted" testID={`${testID}-end-label`}> | ||
| <Text color="fgMuted" font={endLabelFont} testID={`${testID}-end-label`}> |
Contributor
There was a problem hiding this comment.
nit: do we want to inline this now?
hcopp
approved these changes
Feb 20, 2026
Contributor
hcopp
left a comment
There was a problem hiding this comment.
Great work, just had the one nit comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed? Why?
display1–display3andtitle1–title2fonts, matching the existing behavior of the individual TextTitleX/TextDisplayX components. Consumers can still override it.TODO in CDSv9 release notice: make a note that we are making some changes to the default a11y behavior in
Textcomponent.Root cause (required for bugfixes)
UI changes
Testing
How has it been tested?
Testing instructions
Illustrations/Icons Checklist
Required if this PR changes files under
packages/illustrations/**orpackages/icons/**Change management
type=routine
risk=low
impact=sev5
automerge=false