mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(site): add missing aria-labels to AgentsPage icon buttons (#22817)
This commit is contained in:
@@ -207,6 +207,7 @@ function renderBlockList({
|
||||
<button
|
||||
key={`${keyPrefix}-file-${index}`}
|
||||
type="button"
|
||||
aria-label="View image"
|
||||
className="inline-block rounded-md border-0 bg-transparent p-0"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
@@ -347,6 +348,7 @@ const ChatMessageItem = memo<{
|
||||
<button
|
||||
key={`user-file-${i}`}
|
||||
type="button"
|
||||
aria-label="View image"
|
||||
className="inline-block rounded-md border-0 bg-transparent p-0"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
|
||||
@@ -199,6 +199,11 @@ export const ModelsSection: FC<ModelsSectionProps> = ({
|
||||
handleSetDefault(modelConfig);
|
||||
}}
|
||||
aria-disabled={isUpdating || modelConfig.is_default}
|
||||
aria-label={
|
||||
modelConfig.is_default
|
||||
? "Default model"
|
||||
: "Set as default model"
|
||||
}
|
||||
className={cn(
|
||||
"flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-transparent border-0 p-0 transition-colors",
|
||||
modelConfig.is_default
|
||||
|
||||
@@ -24,6 +24,9 @@ export const ChimeButton: FC = () => {
|
||||
variant="subtle"
|
||||
size="icon"
|
||||
onClick={handleClick}
|
||||
aria-label={
|
||||
enabled ? "Mute completion chime" : "Enable completion chime"
|
||||
}
|
||||
className="h-7 w-7 text-content-secondary hover:text-content-primary"
|
||||
>
|
||||
{enabled ? (
|
||||
|
||||
@@ -78,6 +78,7 @@ export const DiffStatsInline: FC<{
|
||||
<button
|
||||
type="button"
|
||||
onClick={onClick}
|
||||
aria-label="View diff statistics"
|
||||
className="inline-flex shrink-0 cursor-pointer items-center border-0 bg-transparent p-0 leading-none transition-opacity hover:opacity-80 outline-none"
|
||||
>
|
||||
<DiffStatNumbers additions={additions} deletions={deletions} />
|
||||
|
||||
@@ -43,6 +43,11 @@ export const WebPushButton: FC = () => {
|
||||
size="icon"
|
||||
disabled={webPush.loading}
|
||||
onClick={handleClick}
|
||||
aria-label={
|
||||
webPush.subscribed
|
||||
? "Disable notifications"
|
||||
: "Enable notifications"
|
||||
}
|
||||
className="h-7 w-7 text-content-secondary hover:text-content-primary"
|
||||
>
|
||||
{webPush.loading ? (
|
||||
|
||||
Reference in New Issue
Block a user