Skip to content

Commit

Permalink
Update: Remove _ariaLevel override property (fixes #283) (#284)
Browse files Browse the repository at this point in the history
* Remove _ariaLevel override property

* Remove schema _ariaLevel override
  • Loading branch information
kirsty-hames authored Nov 13, 2023
1 parent d421b1d commit 887192a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
9 changes: 0 additions & 9 deletions properties.schema
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,6 @@
"help": "",
"translatable": true
},
"_ariaLevel": {
"type": "number",
"required": true,
"default": 0,
"title": "Narrative title level",
"inputType": "Number",
"validators": ["required", "number"],
"help": "Aria level for title"
},
"body": {
"type": "string",
"required": false,
Expand Down
5 changes: 0 additions & 5 deletions schema/component.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,6 @@
"translatable": true
}
},
"_ariaLevel": {
"type": "number",
"title": "Title ARIA level",
"default": 0
},
"body": {
"type": "string",
"title": "Body",
Expand Down
4 changes: 2 additions & 2 deletions templates/narrativeContent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function Narrative(props) {
<div className="narrative__content">
<div className="narrative__content-inner">

{_items.map(({ _index, _isActive, _isVisited, title, body, _ariaLevel, _graphic }) =>
{_items.map(({ _index, _isActive, _isVisited, title, body, _graphic }) =>

<div
className={classes([
Expand Down Expand Up @@ -43,7 +43,7 @@ export default function Narrative(props) {
<div
className="narrative__content-title-inner"
role="heading"
aria-level={a11y.ariaLevel({ id: _id, level: 'componentItem', override: (_ariaLevel || null) })}
aria-level={a11y.ariaLevel({ id: _id, level: 'componentItem' })}
dangerouslySetInnerHTML={{ __html: compile(title, props) }} />
</div>
}
Expand Down

0 comments on commit 887192a

Please sign in to comment.