Skip to content

Commit

Permalink
[docs][TextField] Dynamically modify the eye password button aria-lab…
Browse files Browse the repository at this point in the history
…el (#44122)
  • Loading branch information
ChinoUkaegbu authored Oct 17, 2024
1 parent 4f0301d commit 708dcec
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
12 changes: 9 additions & 3 deletions docs/data/material/components/text-fields/InputAdornments.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ export default function InputAdornments() {
endAdornment={
<InputAdornment position="end">
<IconButton
aria-label="toggle password visibility"
aria-label={
showPassword ? 'hide the password' : 'display the password'
}
onClick={handleClickShowPassword}
onMouseDown={handleMouseDownPassword}
onMouseUp={handleMouseUpPassword}
Expand Down Expand Up @@ -110,7 +112,9 @@ export default function InputAdornments() {
endAdornment={
<InputAdornment position="end">
<IconButton
aria-label="toggle password visibility"
aria-label={
showPassword ? 'hide the password' : 'display the password'
}
onClick={handleClickShowPassword}
onMouseDown={handleMouseDownPassword}
onMouseUp={handleMouseUpPassword}
Expand Down Expand Up @@ -161,7 +165,9 @@ export default function InputAdornments() {
endAdornment={
<InputAdornment position="end">
<IconButton
aria-label="toggle password visibility"
aria-label={
showPassword ? 'hide the password' : 'display the password'
}
onClick={handleClickShowPassword}
onMouseDown={handleMouseDownPassword}
onMouseUp={handleMouseUpPassword}
Expand Down
12 changes: 9 additions & 3 deletions docs/data/material/components/text-fields/InputAdornments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ export default function InputAdornments() {
endAdornment={
<InputAdornment position="end">
<IconButton
aria-label="toggle password visibility"
aria-label={
showPassword ? 'hide the password' : 'display the password'
}
onClick={handleClickShowPassword}
onMouseDown={handleMouseDownPassword}
onMouseUp={handleMouseUpPassword}
Expand Down Expand Up @@ -110,7 +112,9 @@ export default function InputAdornments() {
endAdornment={
<InputAdornment position="end">
<IconButton
aria-label="toggle password visibility"
aria-label={
showPassword ? 'hide the password' : 'display the password'
}
onClick={handleClickShowPassword}
onMouseDown={handleMouseDownPassword}
onMouseUp={handleMouseUpPassword}
Expand Down Expand Up @@ -161,7 +165,9 @@ export default function InputAdornments() {
endAdornment={
<InputAdornment position="end">
<IconButton
aria-label="toggle password visibility"
aria-label={
showPassword ? 'hide the password' : 'display the password'
}
onClick={handleClickShowPassword}
onMouseDown={handleMouseDownPassword}
onMouseUp={handleMouseUpPassword}
Expand Down

0 comments on commit 708dcec

Please sign in to comment.