Skip to content

Commit

Permalink
Fix: Add _isA11yCompletionDescriptionEnabled to schema and remove leg…
Browse files Browse the repository at this point in the history
…acy _disableAccessibilityState (fixes #246) (#460)

* replace schema _disableAccessibilityState with _isA11yCompletionDescriptionEnabled

* replace schema _disableAccessibilityState with _isA11yCompletionDescriptionEnabled

* remove reference to legacy _disableAccessibilityState

* add _isA11yCompletionDescriptionEnabled property to schema

* add _isA11yCompletionDescriptionEnabled property to schema

* add _isA11yCompletionDescriptionEnabled property to schema

* add _isA11yCompletionDescriptionEnabled property to schema

* add _isA11yCompletionDescriptionEnabled property to schema
  • Loading branch information
kirsty-hames authored Oct 27, 2023
1 parent 6be73de commit dfc4208
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 9 deletions.
9 changes: 9 additions & 0 deletions schema/article.model.schema
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,15 @@
"validators": ["number"],
"help": "If you need to override the default article ARIA level (as defined in Configuration Settings), set this to any number greater than 0."
},
"_isA11yCompletionDescriptionEnabled": {
"type": "boolean",
"default": true,
"isSetting": true,
"inputType": "Checkbox",
"validators": [],
"title": "Enable accessibility completion description",
"help": "Controls whether a hidden label is appended to the article title that describes the completion state of the article."
},
"_onScreen": {
"type": "object",
"title": "On-screen classes",
Expand Down
9 changes: 9 additions & 0 deletions schema/block.model.schema
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@
"validators": ["number"],
"help": "If you need to override the default block ARIA level (as defined in Configuration Settings), set this to any number greater than 0."
},
"_isA11yCompletionDescriptionEnabled": {
"type": "boolean",
"default": true,
"isSetting": true,
"inputType": "Checkbox",
"validators": [],
"title": "Enable accessibility completion description",
"help": "Controls whether a hidden label is appended to the block title that describes the completion state of the block."
},
"_onScreen": {
"type": "object",
"title": "On-screen classes",
Expand Down
8 changes: 4 additions & 4 deletions schema/component.model.schema
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@
"validators": ["number"],
"help": "If you need to override the default component ARIA level (as defined in Configuration Settings), set this to any number greater than 0."
},
"_disableAccessibilityState": {
"_isA11yCompletionDescriptionEnabled": {
"type": "boolean",
"default": false,
"default": true,
"isSetting": true,
"inputType": "Checkbox",
"validators": [],
"title": "Is the accessibility state disabled?",
"help": "Controls whether the user can tab to a hidden label that describes the completion state of the component"
"title": "Enable accessibility completion description",
"help": "Controls whether a hidden label is appended to the component title that describes the completion state of the component."
},
"_parentId": {
"type": "objectid",
Expand Down
8 changes: 4 additions & 4 deletions schema/component.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
},
"_backboneForms": "Select"
},
"_disableAccessibilityState": {
"_isA11yCompletionDescriptionEnabled": {
"type": "boolean",
"title": "Disable completion ARIA label",
"description": "Controls whether the user can tab to a hidden label that describes the completion state of the component",
"default": false,
"title": "Enable accessibility completion description",
"description": "Controls whether a hidden label is appended to the component title that describes the completion state of the component.",
"default": true,
"_adapt": {
"isSetting": true
}
Expand Down
9 changes: 9 additions & 0 deletions schema/content.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,15 @@
"isSetting": true
}
},
"_isA11yCompletionDescriptionEnabled": {
"type": "boolean",
"title": "Enable accessibility completion description",
"description": "Controls whether a hidden label is appended to the element title that describes the completion state of the element.",
"default": true,
"_adapt": {
"isSetting": true
}
},
"_onScreen": {
"type": "object",
"title": "Animation classes",
Expand Down
9 changes: 9 additions & 0 deletions schema/contentobject.model.schema
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,15 @@
"validators": ["number"],
"help": "If you need to override the default page ARIA level (as defined in Configuration Settings), set this to any number greater than 0."
},
"_isA11yCompletionDescriptionEnabled": {
"type": "boolean",
"default": true,
"isSetting": true,
"inputType": "Checkbox",
"validators": [],
"title": "Enable accessibility completion description",
"help": "Controls whether a hidden label is appended to the menu/page title that describes the completion state of the menu/page."
},
"_onScreen": {
"type": "object",
"title": "On-screen classes",
Expand Down
9 changes: 9 additions & 0 deletions schema/course.model.schema
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@
"validators": [],
"help": "If set, this class will be applied to the <html> element when the top-level menu in the course is displayed. These are predefined in the theme or added in Custom CSS/Less code."
},
"_isA11yCompletionDescriptionEnabled": {
"type": "boolean",
"default": true,
"isSetting": true,
"inputType": "Checkbox",
"validators": [],
"title": "Enable accessibility completion description",
"help": "Controls whether a hidden label is appended to the course title that describes the completion state of the course."
},
"_extensions": {
"type": "object"
},
Expand Down
1 change: 0 additions & 1 deletion templates/header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { classes, prefixClasses, compile } from 'core/js/reactHelpers';
* @param {string} [props.mobileInstruction]
* @param {string} [props._type]
* @param {string} [props._component]
* @param {string} [props._disableAccessibilityState]
*/
export default function Header(props) {
// Create references to un-controlled view containers
Expand Down

0 comments on commit dfc4208

Please sign in to comment.