This repository was archived by the owner on Feb 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-13
lines changed Expand file tree Collapse file tree 2 files changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ class BlockUi extends Component {
157
157
{ blocking &&
158
158
< div tabIndex = "0" onKeyUp = { this . tabbedUpTop } onKeyDown = { this . tabbedDownTop } ref = { this . setTopFocus } >
159
159
< div className = "sr-only" >
160
- { message || React . isValidElement ( Loader ) ? Loader : ariaLabel }
160
+ { message || ariaLabel }
161
161
</ div >
162
162
</ div > }
163
163
{ renderChilds && children }
@@ -174,8 +174,10 @@ class BlockUi extends Component {
174
174
style = { { top : keepInView ? this . state . top : undefined } }
175
175
>
176
176
< div className = "block-ui-message" >
177
- { message }
178
- { React . isValidElement ( Loader ) ? Loader : < Loader ariaLabel = { ariaLabel } /> }
177
+ { message || < span className = "sr-only" > { ariaLabel } </ span > }
178
+ < div aria-hidden >
179
+ { React . isValidElement ( Loader ) ? Loader : < Loader /> }
180
+ </ div >
179
181
</ div >
180
182
</ div >
181
183
</ div >
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
- import PropTypes from 'prop-types' ;
3
- function Loader ( { ariaLabel } ) {
2
+
3
+ function Loader ( ) {
4
4
return (
5
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 >
6
+ < span className = "loading-bullet" > •</ span > { ' ' }
7
+ < span className = "loading-bullet" > •</ span > { ' ' }
8
+ < span className = "loading-bullet" > •</ span >
10
9
</ div >
11
10
) ;
12
11
}
13
12
14
- Loader . propTypes = {
15
- ariaLabel : PropTypes . string ,
16
- } ;
17
-
18
13
export default Loader ;
You can’t perform that action at this time.
0 commit comments