File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
first-gen/packages/status-light/src Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 1313import {
1414 CSSResultArray ,
1515 html ,
16+ PropertyValues ,
1617 TemplateResult ,
1718} from '@spectrum-web-components/base' ;
1819
@@ -88,6 +89,20 @@ export class StatusLight extends StatusLightBase {
8889 @property ( { type : Boolean , reflect : true } )
8990 public disabled = false ;
9091
92+ // ──────────────────────
93+ // IMPLEMENTATION
94+ // ──────────────────────
95+
96+ protected override updated ( changes : PropertyValues ) : void {
97+ super . updated ( changes ) ;
98+ if ( changes . has ( 'disabled' ) ) {
99+ if ( this . disabled ) {
100+ this . setAttribute ( 'aria-disabled' , 'true' ) ;
101+ } else {
102+ this . removeAttribute ( 'aria-disabled' ) ;
103+ }
104+ }
105+ }
91106 // ──────────────────────────────
92107 // RENDERING & STYLING
93108 // ──────────────────────────────
You can’t perform that action at this time.
0 commit comments