diff --git a/package.json b/package.json index 92569f24..45309f3c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "apg-patterns-examples", "type": "module", - "version": "0.3.3", + "version": "0.3.4", "private": false, "description": "Accessible UI components following WAI-ARIA APG patterns. Multi-framework implementations in React, Vue, Svelte, and Astro with documentation and tests.", "author": "masuP9", diff --git a/src/styles/patterns/accordion.css b/src/styles/patterns/accordion.css index 95e6574e..13c413fb 100644 --- a/src/styles/patterns/accordion.css +++ b/src/styles/patterns/accordion.css @@ -188,8 +188,8 @@ } .apg-accordion-trigger--expanded { - background: Highlight; - color: HighlightText; + background: ButtonFace; + color: ButtonText; } .apg-accordion-trigger:focus { diff --git a/src/styles/patterns/checkbox.css b/src/styles/patterns/checkbox.css index 2994a96a..7d75b605 100644 --- a/src/styles/patterns/checkbox.css +++ b/src/styles/patterns/checkbox.css @@ -182,4 +182,24 @@ apg-checkbox { background: GrayText; border-color: GrayText; } + + .apg-checkbox:hover .apg-checkbox-control { + border-color: Highlight; + } + + .apg-checkbox-input:checked:hover + .apg-checkbox-control, + .apg-checkbox-input:indeterminate:hover + .apg-checkbox-control { + background: Highlight; + border-color: Highlight; + } + + .apg-checkbox:has(.apg-checkbox-input:disabled):hover .apg-checkbox-control { + border-color: GrayText; + } + + .apg-checkbox-input:disabled:checked:hover + .apg-checkbox-control, + .apg-checkbox-input:disabled:indeterminate:hover + .apg-checkbox-control { + background: GrayText; + border-color: GrayText; + } } diff --git a/src/styles/patterns/combobox.css b/src/styles/patterns/combobox.css index 3845a179..6e93fa10 100644 --- a/src/styles/patterns/combobox.css +++ b/src/styles/patterns/combobox.css @@ -253,9 +253,10 @@ border-color: Highlight; } - .apg-combobox-option[aria-selected='true'] { - background: Highlight; - color: HighlightText; + .apg-combobox-option[aria-selected='true'], + .apg-combobox-option:hover:not([aria-disabled='true']) { + outline: 2px solid Highlight; + outline-offset: -2px; } .apg-combobox-option[aria-disabled='true'] { diff --git a/src/styles/patterns/radio-group.css b/src/styles/patterns/radio-group.css index f4cd71b6..cfeffcba 100644 --- a/src/styles/patterns/radio-group.css +++ b/src/styles/patterns/radio-group.css @@ -164,4 +164,13 @@ apg-radio-group { background: GrayText; border-color: GrayText; } + + .apg-radio:not(.apg-radio--disabled):hover .apg-radio-control { + border-color: Highlight; + } + + .apg-radio--selected:not(.apg-radio--disabled):hover .apg-radio-control { + background: Highlight; + border-color: Highlight; + } } diff --git a/src/styles/patterns/switch.css b/src/styles/patterns/switch.css index b2ae1b7c..4ff651eb 100644 --- a/src/styles/patterns/switch.css +++ b/src/styles/patterns/switch.css @@ -200,4 +200,13 @@ apg-switch { .apg-switch:disabled .apg-switch-label { color: GrayText; } + + .apg-switch:hover:not(:disabled) .apg-switch-track { + border-color: Highlight; + } + + .apg-switch[aria-checked='true']:hover:not(:disabled) .apg-switch-track { + background: Highlight; + border-color: Highlight; + } }