Skip to content

Commit

Permalink
Fix: heading completion selector added to aria-label (fixes #561) (#562)
Browse files Browse the repository at this point in the history
* heading completion class added to heading aria-label

* headingView updateAria selector updated
  • Loading branch information
kirsty-hames authored Jul 8, 2024
1 parent 0e1fe9e commit 61d03d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion js/views/headingView.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class HeadingView extends Backbone.View {
const template = Handlebars.templates[this.constructor.template];
const data = this.model.toJSON();
const $rendered = $(`<div>${template(data)}</div>`);
this.$('.aria-label').html($rendered.find('.aria-label').html());
this.$('.js-a11y-completion-description').html($rendered.find('.js-a11y-completion-description').html());
this.checkCompletion();
}

Expand Down
2 changes: 1 addition & 1 deletion templates/heading.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{import_globals}}

<div id="{{_id}}-heading" class="js-heading-inner" role="heading" aria-level="{{a11y_aria_level _id _type _ariaLevel}}">
<span class="aria-label">
<span class="aria-label js-a11y-completion-description">
{{#if _isA11yCompletionDescriptionEnabled}}
{{#if _isOptional}}
{{else if _isComplete}}
Expand Down

0 comments on commit 61d03d4

Please sign in to comment.