code-review-fix task 11.4: add aria-pressed to span drawing and prediction toggle buttons
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
49a2582e8a
commit
9fe833bcfc
2 changed files with 6 additions and 0 deletions
|
|
@ -160,6 +160,7 @@ export default function PredictionPanel({
|
||||||
<label className="text-[10px] text-muted-foreground">Show on chart</label>
|
<label className="text-[10px] text-muted-foreground">Show on chart</label>
|
||||||
<button
|
<button
|
||||||
onClick={onToggleVisibility}
|
onClick={onToggleVisibility}
|
||||||
|
aria-pressed={visible}
|
||||||
className={`px-2 py-0.5 text-[10px] rounded transition-colors ${
|
className={`px-2 py-0.5 text-[10px] rounded transition-colors ${
|
||||||
visible
|
visible
|
||||||
? 'bg-primary/20 text-primary'
|
? 'bg-primary/20 text-primary'
|
||||||
|
|
|
||||||
|
|
@ -126,6 +126,7 @@ export default function Toolbox({
|
||||||
<button
|
<button
|
||||||
onClick={() => handleToolClick('rectangle')}
|
onClick={() => handleToolClick('rectangle')}
|
||||||
aria-label="Rectangle annotation tool"
|
aria-label="Rectangle annotation tool"
|
||||||
|
aria-pressed={activeTool === 'rectangle'}
|
||||||
className={`flex-1 flex items-center justify-center gap-1 px-1.5 py-1.5 text-xs rounded transition-colors ${
|
className={`flex-1 flex items-center justify-center gap-1 px-1.5 py-1.5 text-xs rounded transition-colors ${
|
||||||
activeTool === 'rectangle'
|
activeTool === 'rectangle'
|
||||||
? 'bg-primary text-primary-foreground'
|
? 'bg-primary text-primary-foreground'
|
||||||
|
|
@ -137,6 +138,7 @@ export default function Toolbox({
|
||||||
<button
|
<button
|
||||||
onClick={() => handleToolClick('span')}
|
onClick={() => handleToolClick('span')}
|
||||||
aria-label="Span annotation tool"
|
aria-label="Span annotation tool"
|
||||||
|
aria-pressed={activeTool === 'span'}
|
||||||
className={`flex-1 flex items-center justify-center gap-1 px-1.5 py-1.5 text-xs rounded transition-colors ${
|
className={`flex-1 flex items-center justify-center gap-1 px-1.5 py-1.5 text-xs rounded transition-colors ${
|
||||||
activeTool === 'span'
|
activeTool === 'span'
|
||||||
? 'bg-primary text-primary-foreground'
|
? 'bg-primary text-primary-foreground'
|
||||||
|
|
@ -148,6 +150,7 @@ export default function Toolbox({
|
||||||
<button
|
<button
|
||||||
onClick={() => handleToolClick('line')}
|
onClick={() => handleToolClick('line')}
|
||||||
aria-label="Draw line tool"
|
aria-label="Draw line tool"
|
||||||
|
aria-pressed={activeTool === 'line'}
|
||||||
className={`flex-1 flex items-center justify-center gap-1 px-1.5 py-1.5 text-xs rounded transition-colors ${
|
className={`flex-1 flex items-center justify-center gap-1 px-1.5 py-1.5 text-xs rounded transition-colors ${
|
||||||
activeTool === 'line'
|
activeTool === 'line'
|
||||||
? 'bg-primary text-primary-foreground'
|
? 'bg-primary text-primary-foreground'
|
||||||
|
|
@ -159,6 +162,7 @@ export default function Toolbox({
|
||||||
<button
|
<button
|
||||||
onClick={() => handleToolClick('delete')}
|
onClick={() => handleToolClick('delete')}
|
||||||
aria-label="Delete annotation tool"
|
aria-label="Delete annotation tool"
|
||||||
|
aria-pressed={activeTool === 'delete'}
|
||||||
className={`flex-1 flex items-center justify-center gap-1 px-1.5 py-1.5 text-xs rounded transition-colors ${
|
className={`flex-1 flex items-center justify-center gap-1 px-1.5 py-1.5 text-xs rounded transition-colors ${
|
||||||
activeTool === 'delete'
|
activeTool === 'delete'
|
||||||
? 'bg-destructive text-destructive-foreground'
|
? 'bg-destructive text-destructive-foreground'
|
||||||
|
|
@ -177,6 +181,7 @@ export default function Toolbox({
|
||||||
key={type.id}
|
key={type.id}
|
||||||
onClick={() => handleToolClick(type.name)}
|
onClick={() => handleToolClick(type.name)}
|
||||||
aria-label={`${type.display_name} marker tool`}
|
aria-label={`${type.display_name} marker tool`}
|
||||||
|
aria-pressed={activeTool === type.name}
|
||||||
className={`flex-1 flex items-center justify-center gap-1 px-1.5 py-1.5 text-xs rounded transition-colors ${
|
className={`flex-1 flex items-center justify-center gap-1 px-1.5 py-1.5 text-xs rounded transition-colors ${
|
||||||
activeTool === type.name
|
activeTool === type.name
|
||||||
? 'bg-primary text-primary-foreground'
|
? 'bg-primary text-primary-foreground'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue