Skip to content

Commit

Permalink
Fix: Auto aria-levels (Issue #126)
Browse files Browse the repository at this point in the history
Fixes issue #126. 

Only likely to occur when courses are exported from the Adapt Authoring tool. 

Occurs when _ariaLevel exists and is the default value. Affects subheadings in component (when override exists and set to 0(zero)
  • Loading branch information
StuartNicholls authored Sep 23, 2022
1 parent 91d8eee commit 4309058
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/accordion.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function Accordion (props) {
_ariaLevel,
onClick
} = props;
const itemAriaLevel = _.isNumber(_ariaLevel) ? _ariaLevel + 1 : _ariaLevel;
const itemAriaLevel = _.isNumber(_ariaLevel) && _ariaLevel !== 0 : _ariaLevel;
return (
<div className="component__inner accordion__inner">

Expand Down

0 comments on commit 4309058

Please sign in to comment.