Commit 837f53a
committed
feat(docs[_ext]): Make safety badges accessible and non-selectable
why: Badges should be screen-reader friendly (WCAG) and not pollute
text when users copy tool names.
what:
- CSS: user-select: none on .sd-badge (prevents copy-selection)
- Custom _safety_badge_node with HTML visitor that emits role="note"
and aria-label="Safety tier: <tier>" on every badge span
- Screen readers announce "Safety tier: readonly" etc. for context
- Badge text stays in DOM (visible, not pseudo-element)
- Add test for ARIA attribute storage on badge nodes1 parent 5662071 commit 837f53a
3 files changed
Lines changed: 46 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
424 | | - | |
425 | | - | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
426 | 444 | | |
427 | 445 | | |
428 | 446 | | |
429 | 447 | | |
430 | 448 | | |
431 | 449 | | |
432 | | - | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
433 | 456 | | |
434 | 457 | | |
435 | 458 | | |
| |||
926 | 949 | | |
927 | 950 | | |
928 | 951 | | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
929 | 956 | | |
930 | 957 | | |
931 | 958 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
| 248 | + | |
| 249 | + | |
248 | 250 | | |
249 | 251 | | |
250 | 252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
435 | | - | |
| 435 | + | |
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
| |||
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
446 | 456 | | |
447 | 457 | | |
448 | 458 | | |
| |||
531 | 541 | | |
532 | 542 | | |
533 | 543 | | |
534 | | - | |
535 | | - | |
536 | 544 | | |
537 | 545 | | |
538 | 546 | | |
539 | 547 | | |
540 | 548 | | |
541 | 549 | | |
542 | | - | |
| 550 | + | |
543 | 551 | | |
544 | 552 | | |
545 | 553 | | |
| |||
585 | 593 | | |
586 | 594 | | |
587 | 595 | | |
588 | | - | |
| 596 | + | |
589 | 597 | | |
590 | 598 | | |
591 | 599 | | |
| |||
598 | 606 | | |
599 | 607 | | |
600 | 608 | | |
601 | | - | |
| 609 | + | |
602 | 610 | | |
603 | 611 | | |
604 | 612 | | |
| |||
0 commit comments