@@ -16,7 +16,16 @@ export interface PreviewViewerAugmentationHeaderProp {
16
16
17
17
class PreviewViewerAugmentationHeaderClass extends PreviewViewerHeaderComponentBase < { } , PreviewViewerAugmentationHeaderProp > {
18
18
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
+ } ;
20
29
}
21
30
22
31
private getHighlightGroup ( ) : ControlGroup {
@@ -26,11 +35,16 @@ class PreviewViewerAugmentationHeaderClass extends PreviewViewerHeaderComponentB
26
35
27
36
return {
28
37
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
+ />
34
48
]
35
49
} ;
36
50
}
@@ -40,13 +54,17 @@ class PreviewViewerAugmentationHeaderClass extends PreviewViewerHeaderComponentB
40
54
id : Constants . Ids . serifControl ,
41
55
innerElements : [
42
56
< button
57
+ aria-label = { Localization . getLocalizedString ( "WebClipper.Accessibility.ScreenReader.ChangeFontToSansSerif" ) }
58
+ aria-pressed = { ! this . props . serif ? "true" : "false" }
43
59
id = { Constants . Ids . sansSerif }
44
60
{ ...this . enableInvoke ( this . props . changeFontFamily , 101 , false ) }
45
61
className = { ! this . props . serif ? HeaderClasses . Button . activeControlButton : HeaderClasses . Button . controlButton }
46
62
type = "button" >
47
63
{ Localization . getLocalizedString ( "WebClipper.Preview.Header.SansSerifButtonLabel" ) }
48
64
</ button > ,
49
65
< button
66
+ aria-label = { Localization . getLocalizedString ( "WebClipper.Accessibility.ScreenReader.ChangeFontToSerif" ) }
67
+ aria-pressed = { this . props . serif ? "true" : "false" }
50
68
id = { Constants . Ids . serif }
51
69
{ ...this . enableInvoke ( this . props . changeFontFamily , 102 , true ) }
52
70
className = { this . props . serif ? HeaderClasses . Button . activeControlButton : HeaderClasses . Button . controlButton }
@@ -63,11 +81,13 @@ class PreviewViewerAugmentationHeaderClass extends PreviewViewerHeaderComponentB
63
81
className : HeaderClasses . Button . relatedButtons ,
64
82
innerElements : [
65
83
< button className = { HeaderClasses . Button . controlButton }
84
+ aria-label = { Localization . getLocalizedString ( "WebClipper.Accessibility.ScreenReader.DecreaseFontSize" ) }
66
85
type = "button" { ...this . enableInvoke ( this . props . changeFontSize , 103 , false ) }
67
86
id = { Constants . Ids . decrementFontSize } >
68
87
< img src = { ExtensionUtils . getImageResourceUrl ( "editorOptions/font_down.png" ) } />
69
88
</ button > ,
70
89
< button className = { HeaderClasses . Button . controlButton }
90
+ aria-label = { Localization . getLocalizedString ( "WebClipper.Accessibility.ScreenReader.IncreaseFontSize" ) }
71
91
type = "button" { ...this . enableInvoke ( this . props . changeFontSize , 104 , true ) }
72
92
id = { Constants . Ids . incrementFontSize } >
73
93
< img src = { ExtensionUtils . getImageResourceUrl ( "editorOptions/font_up.png" ) } />
0 commit comments