Skip to content

Commit 9d8c74a

Browse files
Append "pending" to button label and copy to isPending spinner aria-label (#5245)
Announce pending to screen readers.
1 parent 7afd118 commit 9d8c74a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+98
-136
lines changed

packages/@adobe/spectrum-css-temp/components/button/index.css

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,14 @@ governing permissions and limitations under the License.
156156
padding: var(--spectrum-global-dimension-size-65);
157157
}
158158

159+
.spectrum-Button-circleLoader {
160+
position: absolute;
161+
left: 50%;
162+
top: 50%;
163+
transform: translate(-50%, -50%);
164+
}
165+
159166
&.spectrum-Button--pending {
160-
.spectrum-Button-circleLoader {
161-
position: absolute;
162-
left: 50%;
163-
top: 50%;
164-
transform: translate(-50%, -50%);
165-
}
166167

167168
.spectrum-Button-label,
168169
.spectrum-Icon {

packages/@react-aria/progress/src/useProgressBar.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ export interface ProgressBarAria {
2323
labelProps: DOMAttributes
2424
}
2525

26+
const allowedAttributes = new Set(['aria-hidden']);
27+
2628
/**
2729
* Provides the accessibility implementation for a progress bar component.
2830
* Progress bars show either determinate or indeterminate progress of an operation
@@ -40,7 +42,7 @@ export function useProgressBar(props: AriaProgressBarProps): ProgressBarAria {
4042
}
4143
} = props;
4244

43-
let domProps = filterDOMProps(props, {labelable: true});
45+
let domProps = filterDOMProps(props, {labelable: true, propNames: allowedAttributes});
4446
let {labelProps, fieldProps} = useLabel({
4547
...props,
4648
// Progress bar is not an HTML input element so it

packages/@react-spectrum/button/intl/ar-AE.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/@react-spectrum/button/intl/bg-BG.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/@react-spectrum/button/intl/cs-CZ.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/@react-spectrum/button/intl/da-DK.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/@react-spectrum/button/intl/de-DE.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/@react-spectrum/button/intl/el-GR.json

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"loading": "Loading…"
2+
"pending": "pending"
33
}

packages/@react-spectrum/button/intl/es-ES.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)