File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ class ModalHeader extends React.Component {
1313 { this . props . closeButton &&
1414 < button
1515 className = 'close'
16- aria-label = { this . props [ 'aria-label' ] || 'Close' } //eslint-disable-line react/prop-types
1716 onClick = { this . props . onHide }
1817 >
1918 < span aria-hidden = "true" >
@@ -31,6 +30,11 @@ class ModalHeader extends React.Component {
3130ModalHeader . __isModalHeader = true ;
3231
3332ModalHeader . propTypes = {
33+ /**
34+ * The 'aria-label' attribute is used to define a string that labels the current element.
35+ * It is used for Assistive Technology when the label text is not visible on screen.
36+ */
37+ 'aria-label' : React . PropTypes . string ,
3438 /**
3539 * A css class applied to the Component
3640 */
@@ -47,6 +51,7 @@ ModalHeader.propTypes = {
4751} ;
4852
4953ModalHeader . defaultProps = {
54+ 'aria-label' : 'Close' ,
5055 modalClassName : 'modal-header' ,
5156 closeButton : false
5257} ;
You can’t perform that action at this time.
0 commit comments