-
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
Popover does not handle keyboard focus of Grid #8098
Comments
Investigated this a bit and the problem is related to the fact that web-components/packages/grid/src/vaadin-grid-keyboard-navigation-mixin.js Lines 986 to 990 in 8d91c82
This doesn't happen in case of |
UPD: looks like the So, when using <vaadin-button id="button">Discount</vaadin-button>
<vaadin-popover for="button" position="bottom-start" modal with-backdrop></vaadin-popover>
<script type="module">
import '@vaadin/button';
import '@vaadin/grid';
import '@vaadin/popover';
import '@vaadin/text-field';
const popover = document.querySelector('vaadin-popover');
popover.renderer = (root) => {
if (root.firstChild) {
return;
}
root.innerHTML = `
<vaadin-text-field label="1"></vaadin-text-field>
<vaadin-text-field label="2"></vaadin-text-field>
<vaadin-grid size="3">
<vaadin-grid-column path="name" header="First name"></vaadin-grid-column>
</vaadin-grid>
`;
const grid = root.querySelector('vaadin-grid');
grid.dataProvider = (_, cb) => {
const users = [{ name: 'Foo' }, { name: 'Bar' }, { name: 'Baz' }];
cb(users);
};
};
requestAnimationFrame(() => {
// Render an invisible grid
popover.requestContentUpdate();
});
</script> |
Description
Adding a Grid inside a Popover results in accessibility problems because I can't focus the Grid with tab - once the Popover is opened.. pressing Tab three times results in a "blue line" (Firefox) of the Grid's top border or nothing (Safari / Chrome).. instead of focusing the Grid's content like normally.
Once I interact with the mouse - like clicking the first row - it's possible afterwards to use Tab to navigate to the Grid.
Expected outcome
Grid works all the time :)
Minimal reproducible example
Steps to reproduce
Environment
Vaadin version(s): 24.5
OS: MacOS + Windows
Browsers
Chrome, Firefox, Safari
The text was updated successfully, but these errors were encountered: