-
Notifications
You must be signed in to change notification settings - Fork 8
RUM-9561 Update view schema to add accessibility attributes #270
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
Merged
dd-mergequeue
merged 1 commit into
master
from
bplasovska/RUM-9561/accessibility-attributes
Jul 17, 2025
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| { | ||
| "$schema": "http://json-schema.org/draft-07/schema", | ||
| "$id": "rum/_view-accessibility-schema.json", | ||
| "title": "ViewAccessibilityProperties", | ||
| "type": "object", | ||
| "description": "Compact representation of accessibility features for a view", | ||
| "readOnly": true, | ||
| "properties": { | ||
| "text_size": { | ||
| "type": "string", | ||
| "description": "User’s preferred text scale relative to the default system size.", | ||
| "readOnly": true | ||
| }, | ||
| "screen_reader_enabled": { | ||
| "type": "boolean", | ||
| "description": "Indicates whether a screen reader is currently active.", | ||
| "readOnly": true | ||
| }, | ||
| "bold_text_enabled": { | ||
| "type": "boolean", | ||
| "description": "Indicates whether the system-wide bold text accessibility setting is enabled.", | ||
| "readOnly": true | ||
| }, | ||
| "reduce_transparency_enabled": { | ||
| "type": "boolean", | ||
| "description": "Indicates whether the system-wide reduce transparency setting is enabled.", | ||
| "readOnly": true | ||
| }, | ||
| "reduce_motion_enabled": { | ||
| "type": "boolean", | ||
| "description": "Indicates whether the system-wide reduce motion setting is enabled.", | ||
| "readOnly": true | ||
| }, | ||
| "button_shapes_enabled": { | ||
| "type": "boolean", | ||
| "description": "Indicates whether the system-wide button shapes setting is enabled.", | ||
| "readOnly": true | ||
| }, | ||
| "invert_colors_enabled": { | ||
| "type": "boolean", | ||
| "description": "Indicates whether the system-wide color inversion setting is enabled.", | ||
| "readOnly": true | ||
| }, | ||
| "increase_contrast_enabled": { | ||
| "type": "boolean", | ||
| "description": "Indicates whether the system-wide increase contrast setting is enabled.", | ||
| "readOnly": true | ||
| }, | ||
| "assistive_switch_enabled": { | ||
| "type": "boolean", | ||
| "description": "Indicates whether an alternative input method like Switch Control or Switch Access is currently enabled.", | ||
| "readOnly": true | ||
| }, | ||
| "assistive_touch_enabled": { | ||
| "type": "boolean", | ||
| "description": "Indicates whether the system-wide AssistiveTouch feature is currently enabled.", | ||
| "readOnly": true | ||
| }, | ||
| "video_autoplay_enabled": { | ||
| "type": "boolean", | ||
| "description": "Indicates whether the video autoplay setting is enabled in the system or application.", | ||
| "readOnly": true | ||
| }, | ||
| "closed_captioning_enabled": { | ||
| "type": "boolean", | ||
| "description": "Indicates whether closed captioning is enabled for media playback.", | ||
| "readOnly": true | ||
| }, | ||
| "mono_audio_enabled": { | ||
| "type": "boolean", | ||
| "description": "Indicates whether the system-wide mono audio setting is enabled.", | ||
| "readOnly": true | ||
| }, | ||
| "shake_to_undo_enabled": { | ||
| "type": "boolean", | ||
| "description": "Indicates whether the Shake to Undo feature is enabled.", | ||
| "readOnly": true | ||
| }, | ||
| "reduced_animations_enabled": { | ||
| "type": "boolean", | ||
| "description": "Indicates whether the user prefers reduced animations or cross-fade transitions.", | ||
| "readOnly": true | ||
| }, | ||
| "should_differentiate_without_color": { | ||
| "type": "boolean", | ||
| "description": "Indicates whether the system should differentiate interface elements without relying solely on color.", | ||
| "readOnly": true | ||
| }, | ||
| "grayscale_enabled": { | ||
| "type": "boolean", | ||
| "description": "Indicates whether the device display is currently using grayscale mode.", | ||
| "readOnly": true | ||
| }, | ||
| "single_app_mode_enabled": { | ||
| "type": "boolean", | ||
| "description": "Indicates whether the device is currently locked to a single app through Guided Access or Screen Pinning.", | ||
| "readOnly": true | ||
| }, | ||
| "on_off_switch_labels_enabled": { | ||
| "type": "boolean", | ||
| "description": "Indicates whether on/off switch labels are enabled in the system settings.", | ||
| "readOnly": true | ||
| }, | ||
| "speak_screen_enabled": { | ||
| "type": "boolean", | ||
| "description": "Indicates whether the Speak Screen feature is enabled.", | ||
| "readOnly": true | ||
| }, | ||
| "speak_selection_enabled": { | ||
| "type": "boolean", | ||
| "description": "Indicates whether the text-to-speech selection feature is enabled.", | ||
| "readOnly": true | ||
| } | ||
| } | ||
| } |
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
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.
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.
❓ question: What is the difference between
reduce_motion_enabledandreduced_animations_enabled? In the browser, we expect animations to be reduced or removed when we detect theprefers-reduced-motionflag.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.
reduce_motion_enabledindicates whether the Reduce Motion setting is in an enabled state. (doc)reduce_animations_enabledindicates whether the Reduce Motion and the Prefer Cross-Fade Transitions settings are in an enabled state. (doc)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.
It seems that
reduce_motionis only available on iOS, while Android and the web focus more on animations. Should we consolidate this into a single value?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.
Thanks for the suggestion !
Just to give some context, we aligned on these two attributes a while ago through multiple RFCs, and they’re already being sent as custom attributes behind a feature flag. The implementation has been released in the iOS SDK and is currently being dogfooded in the iOS mobile app, where it's also used to populate a dashboard.
At this stage, the work is already quite far along, so I don't think it would make sense to revisit the structure unless there's a critical issue.