My application was recently tested for 508 compliance. I have a cascading dropdown section on one form. First dropdown is a standard dropdown and the second is a filterable dropdown. When I select an option from the first, open the second and type, I am unable to navigate to the options to select one with the keyboard.
I was able to replicate this in the example code by making the second dropdown filterable (NOTE: I'm returning all the data when filtering for simplicity). See below:
import * as React from "react";
import * as ReactDOM from "react-dom";
import { DropDownList, DropDownListChangeEvent, DropDownListFilterChangeEvent } from "@progress/kendo-react-dropdowns";
import { dataCategories, dataProducts, dataOrders } from "./data";
import { filterBy } from '@progress/kendo-data-query';
const defaultItemCategory = { categoryName: "Select Category ..." };
const defaultItemProduct = { productName: "Select Product ..." };
const defaultItemOrder = { orderName: "Select Order ..." };
const App = () => {
const [state, setState] = React.useState({
category: null,
product: null,
order: null,
orders: dataOrders,
products: dataProducts
});
const categoryChange = (event: DropDownListChangeEvent) => {
const category = event.target.value;
const products = dataProducts.filter(
product => product.categoryId === category.categoryId
);
setState({
...state,
category: category,
products: products,
product: null,
order: null
});
};
const productChange = (event: DropDownListChangeEvent) => {
const product = event.target.value;
const orders = dataOrders.filter(
order => order.productId === product.productId
);
setState({
...state,
product: product,
orders: orders,
order: null
});
};
const orderChange = (event: DropDownListChangeEvent) => {
setState({ ...state, order: event.target.value });
};
const ddlProducts_onFilterChange = (event: DropDownListFilterChangeEvent) => {
setState({ products: state.products });
}
const category = state.category;
const product = state.product;
const order = state.order;
const hasCategory = category && category !== defaultItemCategory;
const hasProduct = product && product !== defaultItemProduct;
return (
<div style={{ display: 'flex', gap: '30px', flexWrap: 'wrap' }}>
<div>
Categories
<br />
<DropDownList
style={{ width: '300px' }}
data={dataCategories}
textField="categoryName"
onChange={categoryChange}
defaultItem={defaultItemCategory}
value={category}
/>
</div>
<div>
Products
<br />
<DropDownList
style={{ width: '300px' }}
disabled={!hasCategory}
data={state.products}
textField="productName"
onChange={productChange}
defaultItem={defaultItemProduct}
value={product}
filterable={ true }
onFilterChange={ ddlProducts_onFilterChange }
/>
</div>
<div>
Orders
<br />
<DropDownList
style={{ width: '300px' }}
disabled={!hasProduct}
data={state.orders}
textField="orderName"
onChange={orderChange}
defaultItem={defaultItemOrder}
value={order}
/>
</div>
</div>
);
};
ReactDOM.render(<App />, document.querySelector("my-app"));
Is this a known issue? Please advise.
Thanks in advance