diff --git a/packages/checkbox-group/test/visual/lumo/checkbox-group.test.js b/packages/checkbox-group/test/visual/lumo/checkbox-group.test.js index b17a6f05da..53a0c40de6 100644 --- a/packages/checkbox-group/test/visual/lumo/checkbox-group.test.js +++ b/packages/checkbox-group/test/visual/lumo/checkbox-group.test.js @@ -49,6 +49,13 @@ describe('checkbox-group', () => { await visualDiff(div, 'label-focused'); }); + it('label focused readonly', async () => { + element.label = 'Label'; + element.readonly = true; + await sendKeys({ press: 'Tab' }); + await visualDiff(div, 'label-focused-readonly'); + }); + it('label disabled', async () => { element.label = 'Label'; element.disabled = true; diff --git a/packages/checkbox-group/test/visual/lumo/screenshots/checkbox-group/baseline/label-focused-readonly.png b/packages/checkbox-group/test/visual/lumo/screenshots/checkbox-group/baseline/label-focused-readonly.png new file mode 100644 index 0000000000..efd75cc059 Binary files /dev/null and b/packages/checkbox-group/test/visual/lumo/screenshots/checkbox-group/baseline/label-focused-readonly.png differ diff --git a/packages/checkbox-group/theme/lumo/vaadin-checkbox-group-styles.js b/packages/checkbox-group/theme/lumo/vaadin-checkbox-group-styles.js index 88b3a8c06e..01e222b634 100644 --- a/packages/checkbox-group/theme/lumo/vaadin-checkbox-group-styles.js +++ b/packages/checkbox-group/theme/lumo/vaadin-checkbox-group-styles.js @@ -35,7 +35,7 @@ const checkboxGroup = css` -webkit-text-fill-color: var(--lumo-disabled-text-color); } - :host([focused]:not([disabled])) [part='label'] { + :host([focused]:not([readonly])) [part='label'] { color: var(--lumo-primary-text-color); }