mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
add aria-label to buttons and text fields with no label #2710
This commit is contained in:
@@ -558,6 +558,7 @@ const Customizations = () => {
|
||||
size="small"
|
||||
variant="outlined"
|
||||
placeholder={LL.SEARCH()}
|
||||
aria-label={LL.SEARCH()}
|
||||
onChange={(event) => {
|
||||
setSearch(event.target.value);
|
||||
}}
|
||||
|
||||
@@ -364,6 +364,9 @@ const Dashboard = memo(() => {
|
||||
) && (
|
||||
<IconButton
|
||||
size="small"
|
||||
aria-label={
|
||||
LL.CHANGE_VALUE() + ' ' + LL.VALUE(0)
|
||||
}
|
||||
onClick={() => editDashboardValue(di)}
|
||||
>
|
||||
<EditIcon
|
||||
|
||||
@@ -669,7 +669,7 @@ const Devices = memo(() => {
|
||||
</Typography>
|
||||
<Grid justifyContent="flex-end">
|
||||
<ButtonTooltip title={LL.CLOSE()}>
|
||||
<IconButton onClick={resetDeviceSelect}>
|
||||
<IconButton onClick={resetDeviceSelect} aria-label={LL.CLOSE()}>
|
||||
<HighlightOffIcon color="primary" sx={{ fontSize: 18 }} />
|
||||
</IconButton>
|
||||
</ButtonTooltip>
|
||||
@@ -681,6 +681,7 @@ const Devices = memo(() => {
|
||||
variant="outlined"
|
||||
sx={{ width: '22ch' }}
|
||||
placeholder={LL.SEARCH()}
|
||||
aria-label={LL.SEARCH()}
|
||||
onChange={(event) => {
|
||||
setSearch(event.target.value);
|
||||
}}
|
||||
@@ -695,19 +696,22 @@ const Devices = memo(() => {
|
||||
}}
|
||||
/>
|
||||
<ButtonTooltip title={LL.DEVICE_DETAILS()}>
|
||||
<IconButton onClick={() => setShowDeviceInfo(true)}>
|
||||
<IconButton
|
||||
onClick={() => setShowDeviceInfo(true)}
|
||||
aria-label={LL.DEVICE_DETAILS()}
|
||||
>
|
||||
<InfoOutlinedIcon color="primary" sx={{ fontSize: 18 }} />
|
||||
</IconButton>
|
||||
</ButtonTooltip>
|
||||
{me.admin && (
|
||||
<ButtonTooltip title={LL.CUSTOMIZATIONS()}>
|
||||
<IconButton onClick={customize}>
|
||||
<IconButton onClick={customize} aria-label={LL.CUSTOMIZATIONS()}>
|
||||
<ConstructionIcon color="primary" sx={{ fontSize: 18 }} />
|
||||
</IconButton>
|
||||
</ButtonTooltip>
|
||||
)}
|
||||
<ButtonTooltip title={LL.EXPORT()}>
|
||||
<IconButton onClick={handleDownloadCsv}>
|
||||
<IconButton onClick={handleDownloadCsv} aria-label={LL.EXPORT()}>
|
||||
<DownloadIcon color="primary" sx={{ fontSize: 18 }} />
|
||||
</IconButton>
|
||||
</ButtonTooltip>
|
||||
|
||||
@@ -137,6 +137,7 @@ const DevicesDialog = ({
|
||||
<TextField
|
||||
name="v"
|
||||
value={editItem.v}
|
||||
aria-label={valueLabel}
|
||||
disabled={!writeable}
|
||||
sx={{ width: '30ch' }}
|
||||
select
|
||||
|
||||
@@ -164,7 +164,7 @@ const NetworkSettings = () => {
|
||||
selectedNetwork.bssid
|
||||
}
|
||||
/>
|
||||
<IconButton onClick={setCancel}>
|
||||
<IconButton onClick={setCancel} aria-label={LL.CANCEL()}>
|
||||
<DeleteIcon />
|
||||
</IconButton>
|
||||
</ListItem>
|
||||
|
||||
@@ -211,15 +211,24 @@ const ManageUsers = () => {
|
||||
<Cell stiff>
|
||||
<IconButton
|
||||
size="small"
|
||||
aria-label={LL.GENERATING_TOKEN()}
|
||||
disabled={!authenticatedContext.me.admin}
|
||||
onClick={() => generateTokenForUser(u.username)}
|
||||
>
|
||||
<VpnKeyIcon />
|
||||
</IconButton>
|
||||
<IconButton size="small" onClick={() => removeUser(u)}>
|
||||
<IconButton
|
||||
size="small"
|
||||
onClick={() => removeUser(u)}
|
||||
aria-label={LL.REMOVE()}
|
||||
>
|
||||
<DeleteIcon />
|
||||
</IconButton>
|
||||
<IconButton size="small" onClick={() => editUser(u)}>
|
||||
<IconButton
|
||||
size="small"
|
||||
onClick={() => editUser(u)}
|
||||
aria-label={LL.EDIT()}
|
||||
>
|
||||
<EditIcon />
|
||||
</IconButton>
|
||||
</Cell>
|
||||
|
||||
@@ -355,6 +355,7 @@ const SystemLog = () => {
|
||||
>
|
||||
<IconButton
|
||||
disableRipple
|
||||
aria-label={LL.CANCEL()}
|
||||
onClick={() => {
|
||||
setReadOpen(false);
|
||||
setReadValue('');
|
||||
@@ -380,7 +381,7 @@ const SystemLog = () => {
|
||||
) : (
|
||||
<>
|
||||
{data.developer_mode && (
|
||||
<IconButton onClick={sendReadCommand}>
|
||||
<IconButton onClick={sendReadCommand} aria-label={LL.EXECUTE()}>
|
||||
<PlayArrowIcon color="primary" />
|
||||
</IconButton>
|
||||
)}
|
||||
|
||||
@@ -567,7 +567,10 @@ const Version = () => {
|
||||
<Grid size={{ xs: 8, md: 10 }}>
|
||||
<Typography>
|
||||
{latestVersion?.name}
|
||||
<IconButton onClick={() => setShowVersionInfo(1)}>
|
||||
<IconButton
|
||||
onClick={() => setShowVersionInfo(1)}
|
||||
aria-label={LL.FIRMWARE_VERSION_INFO()}
|
||||
>
|
||||
<InfoOutlinedIcon color="primary" sx={{ fontSize: 18 }} />
|
||||
</IconButton>
|
||||
{showButtons(false)}
|
||||
@@ -580,7 +583,10 @@ const Version = () => {
|
||||
<Grid size={{ xs: 8, md: 10 }}>
|
||||
<Typography>
|
||||
{latestDevVersion?.name}
|
||||
<IconButton onClick={() => setShowVersionInfo(2)}>
|
||||
<IconButton
|
||||
onClick={() => setShowVersionInfo(2)}
|
||||
aria-label={LL.FIRMWARE_VERSION_INFO()}
|
||||
>
|
||||
<InfoOutlinedIcon color="primary" sx={{ fontSize: 18 }} />
|
||||
</IconButton>
|
||||
{showButtons(true)}
|
||||
|
||||
Reference in New Issue
Block a user