File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ const Select = React.createClass({
4646
4747 propTypes : {
4848 addLabelText : React . PropTypes . string , // placeholder displayed when you want to add a label on a multi-value input
49+ 'aria-describedby' : React . PropTypes . string , // HTML ID(s) of element(s) that should be used to describe this input (for assistive tech)
4950 'aria-label' : React . PropTypes . string , // Aria label (for assistive tech)
5051 'aria-labelledby' : React . PropTypes . string , // HTML ID of an element that should be used as the label (for assistive tech)
5152 arrowRenderer : React . PropTypes . func , // Create drop-down caret element
@@ -853,6 +854,7 @@ const Select = React.createClass({
853854 'aria-owns' : ariaOwns ,
854855 'aria-haspopup' : '' + isOpen ,
855856 'aria-activedescendant' : isOpen ? this . _instancePrefix + '-option-' + focusedOptionIndex : this . _instancePrefix + '-value' ,
857+ 'aria-describedby' : this . props [ 'aria-describedby' ] ,
856858 'aria-labelledby' : this . props [ 'aria-labelledby' ] ,
857859 'aria-label' : this . props [ 'aria-label' ] ,
858860 className : className ,
Original file line number Diff line number Diff line change @@ -3803,6 +3803,19 @@ describe('Select', () => {
38033803 'to contain' , < input role = "combobox" aria-labelledby = "test-label-id" /> ) ;
38043804 } ) ;
38053805
3806+ it ( 'passes through the aria-describedby prop' , ( ) => {
3807+
3808+ instance = createControl ( {
3809+ options : defaultOptions ,
3810+ value : 'one' ,
3811+ 'aria-describedby' : 'test-label1-id test-label2-id'
3812+ } ) ;
3813+
3814+ expect ( instance ,
3815+ 'to contain' , < input role = "combobox" aria-describedby = "test-label1-id test-label2-id" /> ) ;
3816+ } ) ;
3817+
3818+
38063819 it ( 'passes through the aria-label prop' , ( ) => {
38073820
38083821 instance = createControl ( {
You can’t perform that action at this time.
0 commit comments