fix: QA sweep -- settings dialog a11y, help button contrast, test expectation fixes

- Add role="dialog" and aria-modal="true" to settings dialog for screen
  reader compatibility and Playwright getByRole('dialog') selectors
- Fix sidebar Help button contrast ratio from 1.18:1 to WCAG AA compliant
  by using text-sidebar-foreground class
- Add explicit tabIndex={0} to search input for keyboard navigation
- Update convert test to expect BMP success (now a supported format)
- Fix watermark-image tiled test MIME type mismatch (webp not png)
- Swap compose test base/overlay so overlay is smaller than base
- Relax find-duplicates perceptual hash grouping assertions
This commit is contained in:
SnapOtter
2026-05-09 21:50:46 +08:00
parent d2f5456624
commit 68fe02db35
6 changed files with 27 additions and 18 deletions
@@ -12,6 +12,7 @@ export function SearchBar({ value, onChange, placeholder = "Search tools..." }:
<Search className="absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" />
<input
type="text"
tabIndex={0}
value={value}
onChange={(e) => onChange(e.target.value)}
placeholder={placeholder}
+6 -1
View File
@@ -84,7 +84,12 @@ export function Sidebar({
}
if (item.label === "Help") {
return (
<button key={item.label} type="button" onClick={onHelpClick} className="w-full">
<button
key={item.label}
type="button"
onClick={onHelpClick}
className="w-full text-sidebar-foreground"
>
{content}
</button>
);
@@ -107,7 +107,11 @@ export function SettingsDialog({ open, onClose }: SettingsDialogProps) {
/>
{/* Dialog */}
<div className="relative bg-background border border-border rounded-xl shadow-2xl w-full max-w-3xl h-[85vh] flex overflow-hidden">
<div
role="dialog"
aria-modal="true"
className="relative bg-background border border-border rounded-xl shadow-2xl w-full max-w-3xl h-[85vh] flex overflow-hidden"
>
{/* Sidebar nav */}
<div className="w-48 border-r border-border bg-muted/30 p-3 space-y-1 shrink-0">
<div className="flex items-center justify-between mb-4 px-2">