Skip to content

Commit a3a759b

Browse files
committed
fix: Form element accessibility.
Fixed Lighthouse " Form elements have associated labels" by adding aria-labels to search box and filter box. Lighthouse score 92 -> 100
1 parent 0c02419 commit a3a759b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/ProjectList/CardsContainer.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,17 +119,17 @@ export default class CardsContainer extends React.Component {
119119
<div>
120120
<div id='container'>
121121
<div className='inputContainer'>
122-
<input id='search' type='text' name='search' placeholder='Search...' onChange={this.handleChange} />
122+
<input id='search' type='text' name='search' placeholder='Search...' onChange={this.handleChange} aria-label='Search'/>
123123
</div>
124-
<div className='inputContainer'>
124+
<div id="tag-selector-container" className='inputContainer'>
125125
<Select
126126
name='tag-selector'
127127
value={this.state.value}
128128
onChange={this.handleSelectChange}
129129
options={this.filterOptions}
130130
multi={true}
131131
placeholder={<div className='filter-placeholder-text' style={{color: "#757575"}}>Filter</div>}
132-
aria-labelledby='Filter'
132+
aria-labelledby='tag-selector-container'
133133
style={{borderColor: "#DCDCDC"}}
134134
/>
135135
</div>

0 commit comments

Comments
 (0)