aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/misc
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-07-17 14:44:19 +0200
committerChocobozzz <me@florianbigard.com>2018-07-17 14:56:15 +0200
commit0f7fedc39857ebc0eb29182c1588a92b9adfb75a (patch)
treef1516e93a93d1042bbc4d14d10575b88cae6bba1 /client/src/app/shared/misc
parent4bdd9473fdecfa7e309e3c59b05b29d0a20ac397 (diff)
downloadPeerTube-0f7fedc39857ebc0eb29182c1588a92b9adfb75a.tar.gz
PeerTube-0f7fedc39857ebc0eb29182c1588a92b9adfb75a.tar.zst
PeerTube-0f7fedc39857ebc0eb29182c1588a92b9adfb75a.zip
Improve frontend accessibility
In particular checkboxes, likes/dislikes, share button, video thumbnails and help buttons
Diffstat (limited to 'client/src/app/shared/misc')
-rw-r--r--client/src/app/shared/misc/help.component.html4
-rw-r--r--client/src/app/shared/misc/help.component.ts9
2 files changed, 13 insertions, 0 deletions
diff --git a/client/src/app/shared/misc/help.component.html b/client/src/app/shared/misc/help.component.html
index f2b6eca33..1c3863e52 100644
--- a/client/src/app/shared/misc/help.component.html
+++ b/client/src/app/shared/misc/help.component.html
@@ -13,10 +13,14 @@
13</ng-template> 13</ng-template>
14 14
15<span 15<span
16 role="button"
16 class="help-tooltip-button" 17 class="help-tooltip-button"
17 title="Get help" 18 title="Get help"
18 i18n-title 19 i18n-title
20 [attr.aria-pressed]="isPopoverOpened"
19 [popover]="tooltipTemplate" 21 [popover]="tooltipTemplate"
20 [placement]="tooltipPlacement" 22 [placement]="tooltipPlacement"
21 [outsideClick]="true" 23 [outsideClick]="true"
24 (onHidden)="onPopoverHidden()"
25 (onShown)="onPopoverShown()"
22></span> 26></span>
diff --git a/client/src/app/shared/misc/help.component.ts b/client/src/app/shared/misc/help.component.ts
index e7af61b4a..ba0452e77 100644
--- a/client/src/app/shared/misc/help.component.ts
+++ b/client/src/app/shared/misc/help.component.ts
@@ -15,6 +15,7 @@ export class HelpComponent implements OnInit, OnChanges {
15 @Input() helpType: 'custom' | 'markdownText' | 'markdownEnhanced' = 'custom' 15 @Input() helpType: 'custom' | 'markdownText' | 'markdownEnhanced' = 'custom'
16 @Input() tooltipPlacement = 'right' 16 @Input() tooltipPlacement = 'right'
17 17
18 isPopoverOpened = false
18 mainHtml = '' 19 mainHtml = ''
19 20
20 constructor (private i18n: I18n) { } 21 constructor (private i18n: I18n) { }
@@ -27,6 +28,14 @@ export class HelpComponent implements OnInit, OnChanges {
27 this.init() 28 this.init()
28 } 29 }
29 30
31 onPopoverHidden () {
32 this.isPopoverOpened = false
33 }
34
35 onPopoverShown () {
36 this.isPopoverOpened = true
37 }
38
30 private init () { 39 private init () {
31 if (this.helpType === 'custom') { 40 if (this.helpType === 'custom') {
32 this.mainHtml = this.customHtml 41 this.mainHtml = this.customHtml