Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update: Add accessible title (refs #74) #75

Merged
merged 13 commits into from
Aug 17, 2022
Merged
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'),
chris-steele marked this conversation as resolved.
Show resolved Hide resolved
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