Add aria-label to input fields for better accessibility (#39)
Added aria-labels to the password input in `components/PasswordGate.tsx` and the grid columns/gap inputs in `components/DevToolbar.tsx` to provide clear semantic meaning for screen readers. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This commit is contained in:
@@ -342,6 +342,7 @@ exifOnHover: ${exifOnHover}`;
|
||||
max={6}
|
||||
value={gridCols}
|
||||
onChange={(e) => updateGridCols(Number(e.target.value))}
|
||||
aria-label="Grid Columns"
|
||||
style={{ width: '100%', accentColor: '#e4e4e7', marginTop: 6 }}
|
||||
/>
|
||||
</div>
|
||||
@@ -353,6 +354,7 @@ exifOnHover: ${exifOnHover}`;
|
||||
max={32}
|
||||
value={gridGap}
|
||||
onChange={(e) => updateGridGap(Number(e.target.value))}
|
||||
aria-label="Grid Gap"
|
||||
style={{ width: '100%', accentColor: '#e4e4e7', marginTop: 6 }}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -55,6 +55,7 @@ export default function PasswordGate({ slug, title }: PasswordGateProps) {
|
||||
value={password}
|
||||
onChange={(e) => setPassword(e.target.value)}
|
||||
placeholder="Enter password"
|
||||
aria-label="Enter password"
|
||||
className={styles.input}
|
||||
autoFocus
|
||||
required
|
||||
|
||||
Reference in New Issue
Block a user