This repository was archived by the owner on Feb 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +23
-7
lines changed Expand file tree Collapse file tree 3 files changed +23
-7
lines changed Original file line number Diff line number Diff line change @@ -155,7 +155,11 @@ class BlockUi extends Component {
155
155
return (
156
156
< Tag { ...attributes } className = { classes } aria-busy = { blocking } >
157
157
{ blocking &&
158
- < div tabIndex = "0" onKeyUp = { this . tabbedUpTop } onKeyDown = { this . tabbedDownTop } ref = { this . setTopFocus } /> }
158
+ < div tabIndex = "0" onKeyUp = { this . tabbedUpTop } onKeyDown = { this . tabbedDownTop } ref = { this . setTopFocus } >
159
+ < div className = "sr-only" >
160
+ { message || React . isValidElement ( Loader ) ? Loader : ariaLabel }
161
+ </ div >
162
+ </ div > }
159
163
{ renderChilds && children }
160
164
{ blocking &&
161
165
< div className = "block-ui-container"
Original file line number Diff line number Diff line change @@ -2,16 +2,17 @@ import React from 'react';
2
2
import PropTypes from 'prop-types' ;
3
3
function Loader ( { ariaLabel } ) {
4
4
return (
5
- < div className = "loading-indicator" aria-label = { ariaLabel } >
6
- < span aria-hidden = "true" className = "loading-bullet" > •</ span > { ' ' }
7
- < span aria-hidden = "true" className = "loading-bullet" > •</ span > { ' ' }
8
- < span aria-hidden = "true" className = "loading-bullet" > •</ span >
5
+ < div className = "loading-indicator" >
6
+ < span className = "sr-only" > { ariaLabel } </ span >
7
+ < span aria-hidden className = "loading-bullet" > •</ span > { ' ' }
8
+ < span aria-hidden className = "loading-bullet" > •</ span > { ' ' }
9
+ < span aria-hidden className = "loading-bullet" > •</ span >
9
10
</ div >
10
11
) ;
11
12
}
12
13
13
14
Loader . propTypes = {
14
- ariaLabel : PropTypes . string
15
- }
15
+ ariaLabel : PropTypes . string ,
16
+ } ;
16
17
17
18
export default Loader ;
Original file line number Diff line number Diff line change
1
+ /* duplicate bootstrap sr-only class for users not using bootstrap/availity-uikit */
2
+ .sr-only {
3
+ position : absolute;
4
+ width : 1px ;
5
+ height : 1px ;
6
+ padding : 0 ;
7
+ margin : -1px ;
8
+ overflow : hidden;
9
+ clip : rect (0 , 0 , 0 , 0 );
10
+ border : 0 ;/* 3 */
11
+ }
1
12
.loading-indicator {
2
13
text-align : center;
3
14
}
You can’t perform that action at this time.
0 commit comments