Skip to content

Commit

Permalink
fix: update breadcrumbs aria-label to use translated strings
Browse files Browse the repository at this point in the history
  • Loading branch information
anpa committed Jun 7, 2023
1 parent 72279b9 commit c75f24d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
6 changes: 5 additions & 1 deletion templates/search_results.hbs
Expand Up @@ -216,7 +216,11 @@
</div>
</div>
<div class="search-result-meta-container">
<nav aria-label="Search result location">
<nav
{{#is type 'article'}}aria-label='{{t 'article_location_with_title' title=title}}'{{/is}}
{{#is type 'community_post'}}aria-label='{{t 'post_location_with_title' title=title}}'{{/is}}
{{#is type 'external_content_record'}}aria-label='{{t 'external_content_location_with_title' title=title}}'{{/is}}
>
<ol class="breadcrumbs search-result-breadcrumbs">
{{#each path_steps}}
<li><a href="{{url}}" target="{{target}}">{{name}}</a></li>
Expand Down
14 changes: 10 additions & 4 deletions templates/user_profile_page.hbs
Expand Up @@ -195,8 +195,11 @@
<span class="status-label status-label-official">{{t 'official_comment'}}</span>
{{/if}}
</header>

<nav aria-label="Activity location">
<nav
{{#is object_type 'article'}}aria-label='{{t 'article_location_with_title' title=title}}'{{/is}}
{{#is object_type 'post'}}aria-label='{{t 'post_location_with_title' title=title}}'{{/is}}
{{#is object_type 'comment'}}aria-label='{{t 'comment_location_with_author_name' author_name=author.name}}'{{/is}}
>
<ol class="breadcrumbs profile-contribution-breadcrumbs">
{{#each path_steps}}
<li><a href="{{url}}">{{name}}</a></li>
Expand Down Expand Up @@ -358,8 +361,11 @@
<span class="status-label status-label-official">{{t 'official_comment'}}</span>
{{/if}}
</header>

<nav aria-label="Contribution location">
<nav
{{#is object_type 'article'}}aria-label='{{t 'article_location_with_title' title=title}}'{{/is}}
{{#is object_type 'post'}}aria-label='{{t 'post_location_with_title' title=title}}'{{/is}}
{{#is object_type 'comment'}}aria-label='{{t 'comment_location_with_author_name' author_name=author.name}}'{{/is}}
>
<ol class="breadcrumbs profile-contribution-breadcrumbs">
{{#each path_steps}}
<li><a href="{{url}}">{{name}}</a></li>
Expand Down

0 comments on commit c75f24d

Please sign in to comment.