File tree Expand file tree Collapse file tree 4 files changed +21
-10
lines changed
core_plugins/kibana/public/management/sections
ui/public/stringify/types Expand file tree Collapse file tree 4 files changed +21
-10
lines changed Original file line number Diff line number Diff line change 7676 class ="kuiLink "
7777 href ="https://en.wikipedia.org/wiki/ISO_week_date "
7878 target ="_blank "
79- title ="Wikipedia: ISO Week Date "
8079 translate ="KIBANA-WIKI_ISO_WEEK_DATE "
8180 > </ a >
8281 </ p >
Original file line number Diff line number Diff line change 7373 class ="kuiTab "
7474 ng-repeat ="editSection in editSections "
7575 ng-class ="{ 'kuiTab-isSelected': state.tab === editSection.index } "
76- title ="{{ editSection.title }} "
7776 ng-click ="changeTab(editSection) "
7877 data-test-subj ="tab-{{ editSection.index }} "
7978 >
8079 {{ editSection.title }}
81- < span data-test-subj ="tab-count-{{ editSection.index }} ">
80+ < span
81+ data-test-subj ="tab-count-{{ editSection.index }} "
82+ aria-label ="{{:: editSection.count + ' ' + editSection.title}} "
83+ >
8284 ({{ editSection.count }})
8385 </ span >
8486 </ button >
Original file line number Diff line number Diff line change @@ -48,12 +48,11 @@ <h1 class="kuiTitle">
4848 class ="kuiTab kbn-management-tab "
4949 ng-class ="{ 'kuiTab-isSelected': state.tab === service.title } "
5050 ng-repeat ="service in services "
51- title ="{{ service.title }} "
5251 ng-click ="changeTab(service) "
5352 >
5453 {{ service.title }}
55- < small >
56- ({{service.data.length}}< span ng-show ="service.total > service.data.length "> of {{service.total}}</ span > )
54+ < small aria-label =" {{:: service.data.length + ' of ' + service.total + ' ' + service.title }} " >
55+ ({{service.data.length}}< span ng-show ="service.total > service.data.length "> of {{service.total}}</ span > )
5756 </ small >
5857 </ button >
5958 </ div >
Original file line number Diff line number Diff line change @@ -89,17 +89,28 @@ export function stringifyUrl(Private) {
8989
9090 html : function ( rawValue , field , hit ) {
9191 const url = _ . escape ( this . _formatUrl ( rawValue ) ) ;
92- let label = _ . escape ( this . _formatLabel ( rawValue , url ) ) ;
92+ const label = _ . escape ( this . _formatLabel ( rawValue , url ) ) ;
9393
9494 switch ( this . param ( 'type' ) ) {
9595 case 'img' :
96- return '<img src="' + url + '" alt="' + label + '" title="' + label + '">' ;
96+ // If the URL hasn't been formatted to become a meaningful label then the best we can do
97+ // is tell screen readers where the image comes from.
98+ const imageLabel =
99+ label === url
100+ ? `A dynamically-specified image located at ${ url } `
101+ : label ;
102+
103+ return `<img src="${ url } " alt="${ imageLabel } ">` ;
97104 default :
105+ let linkLabel ;
106+
98107 if ( hit && hit . highlight && hit . highlight [ field . name ] ) {
99- label = getHighlightHtml ( label , hit . highlight [ field . name ] ) ;
108+ linkLabel = getHighlightHtml ( label , hit . highlight [ field . name ] ) ;
109+ } else {
110+ linkLabel = label ;
100111 }
101112
102- return ' <a href="' + url + ' " target="_blank">' + label + ' </a>' ;
113+ return ` <a href="${ url } " target="_blank">${ linkLabel } </a>` ;
103114 }
104115 }
105116 } ;
You can’t perform that action at this time.
0 commit comments