Skip to content

Commit

Permalink
Update: Add accessible title (refs #74) (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-steele committed Aug 17, 2022
1 parent 175857d commit bbe81f6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions js/TutorModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default class TutorModel extends Backbone.Model {
_attributes: { 'data-adapt-id': parentModel.get('_id') },
_id: parentModel.get('_id'),
_shouldRenderId: false,
altTitle: parentModel.get('altFeedbackTitle'),
title: parentModel.get('feedbackTitle'),
body: parentModel.get('feedbackMessage')
});
Expand Down
8 changes: 8 additions & 0 deletions templates/tutor.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,19 @@
<div class="tutor__content">
<div class="tutor__content-inner">

{{#if title}}
<div class="tutor__title">
<div class="tutor__title-inner" role="heading" aria-level="{{a11y_aria_level _id '@component+1' _ariaLevel }}">
{{{compile title}}}
</div>
</div>
{{else if altTitle}}
<div class="tutor__title aria-label">
<div class="tutor__title-inner" role="heading" aria-level="{{a11y_aria_level _id '@component+1' _ariaLevel }}">
{{{compile altTitle}}}
</div>
</div>
{{/if}}

<div class="tutor__body">
<div class="tutor__body-inner">
Expand Down

0 comments on commit bbe81f6

Please sign in to comment.