Skip to content

RUM-9631: Add accessibility attributes#2787

Merged
jonathanmos merged 4 commits into
developfrom
jmoskovich/rum-9631/accessibility-attributes
Jul 22, 2025
Merged

RUM-9631: Add accessibility attributes#2787
jonathanmos merged 4 commits into
developfrom
jmoskovich/rum-9631/accessibility-attributes

Conversation

@jonathanmos

@jonathanmos jonathanmos commented Jul 14, 2025

Copy link
Copy Markdown
Member

What does this PR do?

Sets up a feature flag (collectAccessibilitySettings). When this flag is active, the SDK collects a number of custom accessibility attributes to send in view updates under the "accessibility" tag. These attributes are:

closed_captions_enabled (boolean) - has closed captioning been activated
color_inversion_enabled (boolean) - has color inversion been activated
reduced_animations_enabled (boolean) - has reduced animation been activated
screen_reader_enabled (boolean) - has talkback been activated
single_app_mode_enabled (boolean) - has screen pinning been activated
text_size (float) - current font size (1.0 is "normal" font)

Some attribute values are collected with listeners that record the new value whenever it changes. For attributes where this is not possible because no listener exists, the value is polled - but not more than once every 30 seconds.

Motivation

Collect additional user insights.

Additional Notes

Anything else we should know when reviewing?

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@jonathanmos
jonathanmos force-pushed the jmoskovich/rum-9631/accessibility-attributes branch from 30ee1a2 to c065b0a Compare July 15, 2025 08:24
@jonathanmos
jonathanmos force-pushed the jmoskovich/rum-9631/accessibility-attributes branch from ba54536 to 2232142 Compare July 16, 2025 09:03
@codecov-commenter

codecov-commenter commented Jul 16, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.36181% with 55 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.90%. Comparing base (3ebb2b5) to head (971e7fe).
⚠️ Report is 1896 commits behind head on develop.

Files with missing lines Patch % Lines
...rum/internal/domain/accessibility/SecureWrapper.kt 3.70% 26 Missing ⚠️
...rum/internal/domain/accessibility/GlobalWrapper.kt 3.85% 25 Missing ⚠️
.../android/rum/internal/domain/scope/RumViewScope.kt 77.78% 1 Missing and 1 partial ⚠️
...otlin/com/datadog/android/rum/_RumInternalProxy.kt 0.00% 1 Missing ⚠️
...domain/accessibility/DatadogAccessibilityReader.kt 98.88% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2787      +/-   ##
===========================================
+ Coverage    69.84%   69.90%   +0.07%     
===========================================
  Files          826      831       +5     
  Lines        30953    31138     +185     
  Branches      5213     5234      +21     
===========================================
+ Hits         21617    21767     +150     
- Misses        7863     7901      +38     
+ Partials      1473     1470       -3     
Files with missing lines Coverage Δ
...rum/src/main/kotlin/com/datadog/android/rum/Rum.kt 88.52% <100.00%> (+0.19%) ⬆️
...kotlin/com/datadog/android/rum/RumConfiguration.kt 97.44% <100.00%> (+0.07%) ⬆️
...lin/com/datadog/android/rum/internal/RumFeature.kt 92.22% <100.00%> (-0.13%) ⬇️
...rum/internal/domain/accessibility/Accessibility.kt 100.00% <100.00%> (ø)
...ternal/domain/accessibility/AccessibilityReader.kt 100.00% <100.00%> (ø)
...d/rum/internal/domain/scope/RumApplicationScope.kt 95.41% <100.00%> (+1.07%) ⬆️
...droid/rum/internal/domain/scope/RumSessionScope.kt 96.03% <100.00%> (+0.06%) ⬆️
...d/rum/internal/domain/scope/RumViewManagerScope.kt 92.38% <100.00%> (+0.15%) ⬆️
.../android/rum/internal/monitor/DatadogRumMonitor.kt 85.45% <100.00%> (+0.04%) ⬆️
...otlin/com/datadog/android/rum/_RumInternalProxy.kt 70.00% <0.00%> (-3.68%) ⬇️
... and 4 more

... and 31 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jonathanmos
jonathanmos marked this pull request as ready for review July 16, 2025 10:18
@jonathanmos
jonathanmos requested review from a team as code owners July 16, 2025 10:18
@jonathanmos
jonathanmos force-pushed the jmoskovich/rum-9631/accessibility-attributes branch from 4c450ec to bb1ce7c Compare July 17, 2025 11:44
@jonathanmos
jonathanmos requested a review from ambushwork July 17, 2025 12:45
@jonathanmos
jonathanmos merged commit fc39b65 into develop Jul 22, 2025
25 checks passed
@jonathanmos
jonathanmos deleted the jmoskovich/rum-9631/accessibility-attributes branch July 22, 2025 07:49
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.

4 participants