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({ ...@@ -273,7 +273,7 @@ function TagEditor({
aria-autocomplete="list" aria-autocomplete="list"
aria-activedescendant={activeDescendant} aria-activedescendant={activeDescendant}
aria-controls={`${tagEditorId}-AutocompleteList`} aria-controls={`${tagEditorId}-AutocompleteList`}
aria-expanded={suggestionsListOpen.toString()} aria-expanded={suggestionsListOpen}
aria-label="Add tags" aria-label="Add tags"
dir="auto" dir="auto"
role="combobox" role="combobox"
......
...@@ -466,16 +466,10 @@ describe('TagEditor', () => { ...@@ -466,16 +466,10 @@ describe('TagEditor', () => {
const wrapper = createComponent(); const wrapper = createComponent();
wrapper.find('input').instance().value = 'non-empty'; // to open list wrapper.find('input').instance().value = 'non-empty'; // to open list
typeInput(wrapper); typeInput(wrapper);
assert.equal( assert.equal(wrapper.find(comboboxSelector).prop('aria-expanded'), true);
wrapper.find(comboboxSelector).prop('aria-expanded'),
'true'
);
selectOption(wrapper, 'tag4'); selectOption(wrapper, 'tag4');
wrapper.update(); wrapper.update();
assert.equal( assert.equal(wrapper.find(comboboxSelector).prop('aria-expanded'), false);
wrapper.find(comboboxSelector).prop('aria-expanded'),
'false'
);
}); });
it('sets the <AutocompleteList> `activeItem` prop to match the selected item index', () => { 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