// https://www.w3.org/TR/core-aam-1.1/#mapping_conflicts // https://w3c.github.io/html-aria/#docconformance describe('getAttribute()', () => { var testbed; beforeEach(() => { testbed = document.createElement('div'); // make sure styles are actually computed document.body.appendChild(testbed); }); afterEach(() => { document.body.removeChild(testbed); }); ['disabled', 'required', 'readonly', 'hidden'].forEach(key => { it('should ignore aria-' + key + ' on conflict with ' + key, () => { testbed.innerHTML = ''; var el = testbed.querySelector('.test'); expect(aria.getAttribute(el, key)).toBe(true); }); }); it('should ignore aria-placeholder on conflict with placeholder', () => { testbed.innerHTML = ''; var el = testbed.querySelector('.test'); expect(aria.getAttribute(el, 'placeholder')).toBe('native'); }); it('should ignore aria-readonly on conflict with contenteditable', () => { testbed.innerHTML = ''; var el = testbed.querySelector('.test'); expect(aria.getAttribute(el, 'readonly')).toBe(false); }); it('should ignore aria-invalid on conflict', () => { testbed.innerHTML = ''; var el = testbed.querySelector('.test'); expect(aria.getAttribute(el, 'invalid')).toBe(true); }); });