Skip to content

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions lib/cjs/generated/rum.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,10 @@ export declare type RumViewEvent = CommonProperties & ViewContainerSchema & {
* Performance data. (Web Vitals, etc.)
*/
performance?: ViewPerformanceData;
/**
* Accessibility properties of the view
*/
accessibility?: ViewAccessibilityProperties;
[k: string]: unknown;
};
/**
Expand Down Expand Up @@ -1665,3 +1669,17 @@ export interface RumRect {
readonly height: number;
[k: string]: unknown;
}
/**
* Compact representation of accessibility features for a view
*/
export interface ViewAccessibilityProperties {
/**
* User’s preferred text scale relative to the default system size.
*/
readonly text_size?: string;
/**
* Base64-encoded 64-bit mask representing enabled accessibility features.
*/
readonly features?: string;
[k: string]: unknown;
}
18 changes: 18 additions & 0 deletions lib/esm/generated/rum.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,10 @@ export declare type RumViewEvent = CommonProperties & ViewContainerSchema & {
* Performance data. (Web Vitals, etc.)
*/
performance?: ViewPerformanceData;
/**
* Accessibility properties of the view
*/
accessibility?: ViewAccessibilityProperties;
[k: string]: unknown;
};
/**
Expand Down Expand Up @@ -1665,3 +1669,17 @@ export interface RumRect {
readonly height: number;
[k: string]: unknown;
}
/**
* Compact representation of accessibility features for a view
*/
export interface ViewAccessibilityProperties {
/**
* User’s preferred text scale relative to the default system size.
*/
readonly text_size?: string;
/**
* Base64-encoded 64-bit mask representing enabled accessibility features.
*/
readonly features?: string;
[k: string]: unknown;
}
20 changes: 20 additions & 0 deletions schemas/rum/_view-accessibility-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$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
},
"features": {
"type": "string",
"description": "Base64-encoded 64-bit mask representing enabled accessibility features.",
"readOnly": true
}
}
}
4 changes: 4 additions & 0 deletions schemas/rum/view-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,10 @@
"performance": {
"description": "Performance data. (Web Vitals, etc.)",
"allOf": [{ "$ref": "_view-performance-schema.json" }]
},
"accessibility": {
"description": "Accessibility properties of the view",
"allOf": [{ "$ref": "_view-accessibility-schema.json" }]
}
},
"readOnly": true
Expand Down
3 changes: 3 additions & 0 deletions static-analysis.datadog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
rulesets:
ignore:
- 'lib/esm/generated/**' # disable static analysis