mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-30 03:00:41 -04:00
fix(copilot): use read-only aria-label on disabled mode/model toggles
When readOnly=true, aria-label now describes the current state
("Advanced model active for this session") instead of announcing
an unavailable switch action, per WCAG accessible name guidance.
This commit is contained in:
@@ -26,7 +26,11 @@ export function ModeToggleButton({ mode, onToggle, readOnly = false }: Props) {
|
||||
readOnly && "cursor-default opacity-70",
|
||||
)}
|
||||
aria-label={
|
||||
isExtended ? "Switch to Fast mode" : "Switch to Extended Thinking mode"
|
||||
readOnly
|
||||
? `${isExtended ? "Extended Thinking" : "Fast"} mode active for this session`
|
||||
: isExtended
|
||||
? "Switch to Fast mode"
|
||||
: "Switch to Extended Thinking mode"
|
||||
}
|
||||
title={
|
||||
readOnly
|
||||
|
||||
@@ -30,7 +30,11 @@ export function ModelToggleButton({
|
||||
readOnly && "cursor-default opacity-70",
|
||||
)}
|
||||
aria-label={
|
||||
isAdvanced ? "Switch to Standard model" : "Switch to Advanced model"
|
||||
readOnly
|
||||
? `${isAdvanced ? "Advanced" : "Standard"} model active for this session`
|
||||
: isAdvanced
|
||||
? "Switch to Standard model"
|
||||
: "Switch to Advanced model"
|
||||
}
|
||||
title={
|
||||
readOnly
|
||||
|
||||
Reference in New Issue
Block a user