Skip to content

Commit

Permalink
Required and optional labels added
Browse files Browse the repository at this point in the history
  • Loading branch information
zubairslamdien committed May 3, 2024
1 parent 1fc32a3 commit 0ffd539
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion templates/boxMenuItem.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@
</div>
{{/if}}

{{#all _globals._accessibility._ariaLabels.optional _globals._accessibility._ariaLabels.required}}
<div class='menu-item__priority boxmenu-item__priority' aria-hidden="true">
<span class="label">
{{#if _isOptional}}{{{_globals._accessibility._ariaLabels.optional}}}{{else}}{{{_globals._accessibility._ariaLabels.required}}}{{/if}}
</span>
</div>
{{/all}}

{{#if duration}}
<div class="menu-item__duration boxmenu-item__duration">
<div class="menu-item__duration-inner boxmenu-item__duration-inner">
Expand All @@ -40,7 +48,7 @@
</div>

<div class="menu-item__button-container boxmenu-item__button-container">
<button class="btn-text menu-item__button boxmenu-item__button js-btn-click{{#if _isVisited}} is-visited{{/if}}{{#if _isLocked}} is-locked{{/if}}" aria-label="{{#if _isComplete}}{{_globals._accessibility._ariaLabels.complete}}. {{else _isVisited}}{{_globals._accessibility._ariaLabels.visited}}. {{/if}}{{#if _isLocked}}{{_globals._accessibility._ariaLabels.locked}}. {{else}}{{linkText}} {{/if}}{{title}}. {{{compile _globals._menu._boxMenu.itemCount}}}.{{#if _isOptional}} {{_globals._accessibility._ariaLabels.optional}}{{/if}}"{{#if _isLocked}} aria-disabled="true"{{/if}} role="link">
<button class="btn-text menu-item__button boxmenu-item__button js-btn-click{{#if _isVisited}} is-visited{{/if}}{{#if _isLocked}} is-locked{{/if}}" aria-label="{{#if _isComplete}}{{_globals._accessibility._ariaLabels.complete}}. {{else _isVisited}}{{_globals._accessibility._ariaLabels.visited}}. {{/if}}{{#if _isLocked}}{{_globals._accessibility._ariaLabels.locked}}. {{else}}{{linkText}} {{/if}}{{title}}. {{{compile _globals._menu._boxMenu.itemCount}}}.{{#if _isOptional}} {{_globals._accessibility._ariaLabels.optional}}{{else}} {{_globals._accessibility._ariaLabels.required}}{{/if}}"{{#if _isLocked}} aria-disabled="true"{{/if}} role="link">
{{{linkText}}}
</button>

Expand Down

0 comments on commit 0ffd539

Please sign in to comment.