File tree Expand file tree Collapse file tree 5 files changed +61
-17
lines changed
Expand file tree Collapse file tree 5 files changed +61
-17
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
88## [ Unreleased]
99
1010- TMS-1166: Fix duet-datepicker border on focus
11+ - TMS-1163: Search results breadcrumbs accessibility fixes
1112
1213## [ 1.64.0] - 2025-08-13
1314
Original file line number Diff line number Diff line change @@ -35,13 +35,20 @@ $search-item-hover: $primary-dark !default;
3535.search-item {
3636 & __inner {
3737 display : flex ;
38- flex-direction : column-reverse ;
38+ flex-direction : column ;
3939
4040 @include from ($desktop ) {
4141 margin-right : 8.06rem ;
4242 }
4343 }
4444
45+ & __content {
46+ display : flex ;
47+ flex-direction : column ;
48+ align-items : flex-start ;
49+ }
50+
51+
4552 & __meta-item ,
4653 & __title {
4754 a {
@@ -87,7 +94,8 @@ $search-item-hover: $primary-dark !default;
8794 }
8895
8996 & :first-child {
90- a {
97+ a ,
98+ span {
9199 padding-right : .25rem ;
92100 }
93101 }
Original file line number Diff line number Diff line change @@ -293,7 +293,7 @@ private function enrich_results( $posts ) {
293293
294294 switch ( $ post_item ->post_type ) {
295295 case Page::SLUG :
296- $ post_item ->content_type = get_post_type_object ( Page::SLUG )->labels ->singular_name ;
296+ $ post_item ->page_content_type = \ get_post_type_object ( Page::SLUG )->labels ->singular_name ;
297297 $ post_item ->breadcrumbs = $ this ->prepare_by_type (
298298 Page::SLUG ,
299299 $ post_item ->ID ,
@@ -307,16 +307,14 @@ private function enrich_results( $posts ) {
307307
308308 break ;
309309 case Post::SLUG :
310- $ post_item ->content_type = get_post_type_object ( Post::SLUG )->labels ->singular_name ;
311-
312310 $ meta = $ this ->format_result_item_meta (
313311 $ post_item ,
314312 Post::get_primary_category ( $ post_item ->ID )
315313 );
316314
317315 break ;
318316 case BlogArticle::SLUG :
319- $ post_item ->content_type = get_post_type_object ( BlogArticle::SLUG )->labels ->singular_name ;
317+ $ post_item ->content_type = \ get_post_type_object ( BlogArticle::SLUG )->labels ->singular_name ;
320318
321319 $ meta = $ this ->format_result_item_meta (
322320 $ post_item ,
@@ -331,9 +329,9 @@ private function enrich_results( $posts ) {
331329 }
332330
333331 $ post_item ->meta = $ meta ;
334- $ post_item ->permalink = get_permalink ( $ post_item ->ID );
332+ $ post_item ->permalink = \ get_permalink ( $ post_item ->ID );
335333
336- apply_filters ( 'tms/theme/base/search_result_item ' , $ post_item );
334+ \ apply_filters ( 'tms/theme/base/search_result_item ' , $ post_item );
337335 }
338336
339337 return $ posts ;
Original file line number Diff line number Diff line change 1+ {?breadcrumbs}
2+ <nav class="breadcrumb has-succeeds-separator" aria-label="{Strings.s.header.breadcrumbs|attr}">
3+ <ul class="breadcrumbs__nav is-relative is-flex m-0 p-0 is-family-secondary">
4+ {#breadcrumbs}
5+ <li class="{?is_active}is-active{/is_active} {?class}{class|attr}{/class}">
6+ {?permalink}
7+ <span class="p-0" {?is_active}aria-current="page"{/is_active}>
8+ {?icon}
9+ {>"ui/icon" icon=icon class=icon_class /}
10+ {/icon}
11+ {?title}
12+ {title|html}
13+ {/title}
14+ </span>
15+ {:else}
16+ <span {?is_active}aria-current="page"{/is_active} class="ml-3">
17+ {?icon}
18+ {>"ui/icon" icon=icon class=icon_class /}
19+ {/icon}
20+ {?title}
21+ {title|html}
22+ {/title}
23+ </span>
24+ {/permalink}
25+ </li>
26+ {/breadcrumbs}
27+ </ul>
28+ </nav>
29+ {/breadcrumbs}
Original file line number Diff line number Diff line change 77 <div class="search-item mb-6 p-6 p-8-desktop {template_classes.search_item|attr}">
88 <div class="search-item__inner">
99
10- <div>
10+ <div class="search-item__content" >
1111 <h2 class="h5 mt-4 mb-0 search-item__title">
1212 <a href="{permalink|url}">
1313 {post_title|html}
1414 </a>
1515 </h2>
1616
17+ {?meta}
18+ <div class="search-item__meta-container has-text-weight-medium mt-4">
19+ {>"views/search/search-item-meta" /}
20+ </div>
21+ {/meta}
22+
1723 {?content_type}
1824 <span class="mt-4 pill has-background-primary-invert has-text-primary is-bordered">
1925 {content_type|html}
2733 {/post_excerpt}
2834 </div>
2935
30- <div>
36+ <div class="search-item__breadcrumbs mt-4" >
3137 {?breadcrumbs}
3238 <div class="search-item__meta-container has-text-weight-medium">
3339 <span class="is-sr-only">{Strings.s.search.breadcrumbs|html} </span>
3440 <div class="breadcrumb has-succeeds-separator">
35- <ul class="breadcrumbs__nav is-relative is-flex m-0 p-0 is-family-secondary">
41+ <ul class="breadcrumbs__nav is-relative is-flex p-0 is-family-secondary">
3642 {#breadcrumbs}
3743 <li class="{?is_active}is-active{/is_active} {?class}{class|attr}{/class}">
3844 {?permalink}
39- <span href="{permalink|url}" { ?is_active}aria-current="page"{/is_active} class="mr-2 ml-0 ">
45+ <span { ?is_active}aria-current="page"{/is_active} class="mr-2 ml-1 ">
4046 {?icon}
4147 {>"ui/icon" /}
4248 {/icon}
6066 </div>
6167 </div>
6268 {/breadcrumbs}
69+ </div>
6370
64- {?meta}
65- <div class="search-item__meta-container has-text-weight-medium">
66- {>"views/search/search-item-meta" /}
67- </div>
68- {/meta}
71+ <div class="search-item__content">
72+ {?page_content_type}
73+ <span class="mt-4 pill has-background-primary-invert has-text-primary is-bordered">
74+ {page_content_type|html}
75+ </span>
76+ {/page_content_type}
6977 </div>
7078
7179 </div>
You can’t perform that action at this time.
0 commit comments