Commit ee70806a authored by Alejandro Celaya's avatar Alejandro Celaya Committed by Alejandro Celaya

Use boolean values for aria-expanded in JSX

parent 53a1c634
......@@ -273,7 +273,7 @@ function TagEditor({
aria-autocomplete="list"
aria-activedescendant={activeDescendant}
aria-controls={`${tagEditorId}-AutocompleteList`}
aria-expanded={suggestionsListOpen.toString()}
aria-expanded={suggestionsListOpen}
aria-label="Add tags"
dir="auto"
role="combobox"
......
......@@ -466,16 +466,10 @@ describe('TagEditor', () => {
const wrapper = createComponent();
wrapper.find('input').instance().value = 'non-empty'; // to open list
typeInput(wrapper);
assert.equal(
wrapper.find(comboboxSelector).prop('aria-expanded'),
'true'
);
assert.equal(wrapper.find(comboboxSelector).prop('aria-expanded'), true);
selectOption(wrapper, 'tag4');
wrapper.update();
assert.equal(
wrapper.find(comboboxSelector).prop('aria-expanded'),
'false'
);
assert.equal(wrapper.find(comboboxSelector).prop('aria-expanded'), false);
});
it('sets the <AutocompleteList> `activeItem` prop to match the selected item index', () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment