Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix aria-disabled usage #2056

Merged
merged 1 commit into from
Aug 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/main/src/ProgressIndicator.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
aria-valuenow="{{validatedValue}}"
aria-valuemax="100"
aria-valuetext="{{valueStateText}}"
?aria-disabled="{{disabled}}"
aria-disabled="{{_ariaDisabled}}"
>
<div class="ui5-progress-indicator-bar" style="{{styles.bar}}">
{{#unless showValueInRemainingBar}}
Expand Down
4 changes: 4 additions & 0 deletions packages/main/src/ProgressIndicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ class ProgressIndicator extends UI5Element {
return this.valueStateIconMappings()[this.valueState];
}

get _ariaDisabled() {
return this.disabled || undefined;
}

static async onDefine() {
await fetchI18nBundle("@ui5/webcomponents");
}
Expand Down
8 changes: 4 additions & 4 deletions packages/main/src/RatingIndicator.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
role="slider"
aria-roledescription="{{_ariaRoleDescription}}"
aria-valuemin="0"
aria-valuenow="{{this.value}}"
aria-valuemax="{{this.maxValue}}"
aria-valuenow="{{value}}"
aria-valuemax="{{maxValue}}"
aria-orientation="horizontal"
?aria-disabled="{{this.disabled}}"
?aria-readonly="{{this.readOnly}}"
aria-disabled="{{_ariaDisabled}}"
?aria-readonly="{{readOnly}}"
tabindex="{{tabIndex}}"
@focusin="{{_onfocusin}}"
@focusout="{{_onfocusout}}"
Expand Down
4 changes: 4 additions & 0 deletions packages/main/src/RatingIndicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ class RatingIndicator extends UI5Element {
get _ariaRoleDescription() {
return this.i18nBundle.getText(RATING_INDICATOR_TEXT);
}

get _ariaDisabled() {
return this.disabled || undefined;
}
}

RatingIndicator.define();
Expand Down
2 changes: 1 addition & 1 deletion packages/main/src/TabInStrip.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
aria-setsize="{{this._setsize}}"
aria-controls="ui5-tc-contentItem-{{this._posinset}}"
aria-selected="{{this.effectiveSelected}}"
?aria-disabled="{{this.effectiveDisabled}}"
aria-disabled="{{this.effectiveDisabled}}"
?disabled="{{this.effectiveDisabled}}"
aria-labelledby="{{this.ariaLabelledBy}}"
data-ui5-stable="{{this.stableDomRef}}"
Expand Down