File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
src/webviews/apps/shared/components/actions Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ export class ActionItem extends LitElement {
8787 return this . icon ;
8888 }
8989
90- get effectiveLabel ( ) : string | undefined {
90+ get effectiveTooltip ( ) : string | undefined {
9191 if ( ! this . label && ! this . altLabel ) {
9292 return undefined ;
9393 }
@@ -100,6 +100,16 @@ export class ActionItem extends LitElement {
100100 return this . label ;
101101 }
102102
103+ get effectiveLabel ( ) : string | undefined {
104+ if ( ! this . label && ! this . altLabel ) {
105+ return undefined ;
106+ }
107+ if ( this . altLabel && this . isAltKeyPressed ) {
108+ return this . altLabel ;
109+ }
110+ return this . label ;
111+ }
112+
103113 get effectiveHref ( ) : string | undefined {
104114 if ( this . isAltKeyPressed && this . altHref ) {
105115 return this . altHref ;
@@ -130,11 +140,11 @@ export class ActionItem extends LitElement {
130140
131141 override render ( ) : unknown {
132142 return html `
133- < gl-tooltip hoist content ="${ this . effectiveLabel ?? nothing } ">
143+ < gl-tooltip hoist content ="${ this . effectiveTooltip ?? nothing } ">
134144 < a
135145 role ="${ ! this . effectiveHref ? 'button' : nothing } "
136146 type ="${ ! this . effectiveHref ? 'button' : nothing } "
137- aria-label ="${ this . label ?? nothing } "
147+ aria-label ="${ this . effectiveLabel ?? nothing } "
138148 ?disabled =${ this . disabled }
139149 href =${ this . effectiveHref ?? nothing }
140150 >
You can’t perform that action at this time.
0 commit comments