-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: ensure aria-selected attribute is removed from the item clone #8275
Conversation
Issue: The <vaadin-select></vaadin-select>
<script type="module">
import '@vaadin/select';
import '@vaadin/list-box';
import '@vaadin/item';
import { render, html } from 'lit';
const select = document.querySelector('vaadin-select');
select.renderer = (root) => {
render(
html`
<vaadin-list-box>
<vaadin-item label="Label 0" value="value-0">Option 0</vaadin-item>
<vaadin-item label="Label 1" value="value-1">Option 1</vaadin-item>
</vaadin-list-box>
`,
root,
);
};
</script> UPD: This issue is actually reproducible with both Lit and Polymer. |
Good catch, this seems to be caused by setting Note, we most probably don't need
So IMO can remove |
I'm just wondering if both issues could be resolved by ensuring the |
2d33561
to
d468854
Compare
Makes sense, thanks. Updated and renamed the PR accordingly. |
UPD: unfortunately we still would need to remove |
d468854
to
ce58212
Compare
Quality Gate passedIssues Measures |
This ticket/PR has been released with Vaadin 24.6.0. |
Description
selected
property inItemMixin
to usesync: true
so it triggers observer synchronouslyperformUpdate()
on the item clone invaadin-select
to removearia-selected
aria-selected
attribute is removed (in Lit version it was not)Note: there was an error in the "keyboard selection" test apparently caused by the fact that "append value item" was called too late. Added
await nextUpdate()
to this test helped to remove the error so I think it was a test issue.Type of change