@@ -16,7 +16,16 @@ export interface PreviewViewerAugmentationHeaderProp {
1616
1717class PreviewViewerAugmentationHeaderClass extends PreviewViewerHeaderComponentBase < { } , PreviewViewerAugmentationHeaderProp > {
1818 getControlGroups ( ) : ControlGroup [ ] {
19- return [ this . getHighlightGroup ( ) , this . getSerifGroup ( ) , this . getFontSizeGroup ( ) ] ;
19+ return [ this . getScreenReaderTitleGroup ( ) , this . getHighlightGroup ( ) , this . getSerifGroup ( ) , this . getFontSizeGroup ( ) ] ;
20+ }
21+
22+ private getScreenReaderTitleGroup ( ) {
23+ return {
24+ className : Constants . Classes . srOnly ,
25+ innerElements : [
26+ < div > { Localization . getLocalizedString ( "WebClipper.ClipType.Article.Button" ) } </ div >
27+ ]
28+ } ;
2029 }
2130
2231 private getHighlightGroup ( ) : ControlGroup {
@@ -26,11 +35,16 @@ class PreviewViewerAugmentationHeaderClass extends PreviewViewerHeaderComponentB
2635
2736 return {
2837 id : Constants . Ids . highlightControl ,
29- innerElements : [ < img
30- id = { Constants . Ids . highlightButton }
31- { ...this . enableInvoke ( this . props . toggleHighlight , 100 ) }
32- className = { classForHighlighter }
33- src = { ExtensionUtils . getImageResourceUrl ( imgSrc ) } />
38+ innerElements : [
39+ < img
40+ role = "button"
41+ aria-label = { Localization . getLocalizedString ( "WebClipper.Accessibility.ScreenReader.ToggleHighlighterForArticleMode" ) }
42+ aria-pressed = { highlighterEnabled ? "true" : "false" }
43+ id = { Constants . Ids . highlightButton }
44+ { ...this . enableInvoke ( this . props . toggleHighlight , 100 ) }
45+ className = { classForHighlighter }
46+ src = { ExtensionUtils . getImageResourceUrl ( imgSrc ) }
47+ />
3448 ]
3549 } ;
3650 }
@@ -40,13 +54,17 @@ class PreviewViewerAugmentationHeaderClass extends PreviewViewerHeaderComponentB
4054 id : Constants . Ids . serifControl ,
4155 innerElements : [
4256 < button
57+ aria-label = { Localization . getLocalizedString ( "WebClipper.Accessibility.ScreenReader.ChangeFontToSansSerif" ) }
58+ aria-pressed = { ! this . props . serif ? "true" : "false" }
4359 id = { Constants . Ids . sansSerif }
4460 { ...this . enableInvoke ( this . props . changeFontFamily , 101 , false ) }
4561 className = { ! this . props . serif ? HeaderClasses . Button . activeControlButton : HeaderClasses . Button . controlButton }
4662 type = "button" >
4763 { Localization . getLocalizedString ( "WebClipper.Preview.Header.SansSerifButtonLabel" ) }
4864 </ button > ,
4965 < button
66+ aria-label = { Localization . getLocalizedString ( "WebClipper.Accessibility.ScreenReader.ChangeFontToSerif" ) }
67+ aria-pressed = { this . props . serif ? "true" : "false" }
5068 id = { Constants . Ids . serif }
5169 { ...this . enableInvoke ( this . props . changeFontFamily , 102 , true ) }
5270 className = { this . props . serif ? HeaderClasses . Button . activeControlButton : HeaderClasses . Button . controlButton }
@@ -63,11 +81,13 @@ class PreviewViewerAugmentationHeaderClass extends PreviewViewerHeaderComponentB
6381 className : HeaderClasses . Button . relatedButtons ,
6482 innerElements : [
6583 < button className = { HeaderClasses . Button . controlButton }
84+ aria-label = { Localization . getLocalizedString ( "WebClipper.Accessibility.ScreenReader.DecreaseFontSize" ) }
6685 type = "button" { ...this . enableInvoke ( this . props . changeFontSize , 103 , false ) }
6786 id = { Constants . Ids . decrementFontSize } >
6887 < img src = { ExtensionUtils . getImageResourceUrl ( "editorOptions/font_down.png" ) } />
6988 </ button > ,
7089 < button className = { HeaderClasses . Button . controlButton }
90+ aria-label = { Localization . getLocalizedString ( "WebClipper.Accessibility.ScreenReader.IncreaseFontSize" ) }
7191 type = "button" { ...this . enableInvoke ( this . props . changeFontSize , 104 , true ) }
7292 id = { Constants . Ids . incrementFontSize } >
7393 < img src = { ExtensionUtils . getImageResourceUrl ( "editorOptions/font_up.png" ) } />
0 commit comments