Assessment of detail / summary support for AT

Summary of tests

<detail> / <summary> is a standard pattern for expand / collapse behaviour in HTML 5.1.

A single heading element is allowable as the content of a <summary> element in the HTML 5.1 specification for summary:

Content model: Either: phrasing content. Or: one element of heading content.

However, browser and screen reader support for this is even less consistent than with only plain text in the summary (which is also poor).

After the test results, a proposed omnifill solution is shown to meet all of the expected behaviour outlined below.

Expected behaviour

The expand / collapse should behave as follows: (Note: these criteria require supporting documentation)

See WAI-ARIA Accordion design pattern.

NVDA 2018 and JAWS 2018 were used to test behaviour in the three major supported browsers: Chrome, Firefox, and Internet Explorer 11.

Vanilla HTML Test Cases

Results for Test 2018-1 - Vanilla HTML with heading inside summary

None of the browsers tested matched the expected behaviour. * indicates that behaviour is partly working. See notes below.

With NVDA:

Browser Headings list Buttons list Expandable / collapsible State voiced Expansion / collapse voiced
Expected Yes Yes Yes Yes Yes
Chrome 68 Yes Yes Yes * Yes Yes *
Firefox 61 Yes Yes Yes Yes No
IE 11 Yes No No No No

With JAWS 2018:

Browser Headings list Buttons list Expandable / collapsible State voiced Expansion / collapse voiced
Expected Yes Yes Yes Yes Yes
Chrome 68 No Yes Yes Yes Yes *
Firefox 61 No Yes Yes Yes Yes
IE 11 Yes No No No No

Results for Test 2018-2 - Vanilla HTML with no heading inside summary

With NVDA:

None of the browsers tested matched the expected behaviour. * indicates that behaviour is partly working. See notes below.

Browser Headings list Buttons list Expandable / collapsible State voiced Expansion / collapse voiced
Expected No Yes Yes Yes Yes
Chrome 68 No Yes Yes Yes Yes *
Firefox 61 No Yes Yes Yes No
IE 11 No No No No No

With JAWS 2018:

Browser Headings list Buttons list Expandable / collapsible State voiced Expansion / collapse voiced
Expected No Yes Yes Yes Yes
Chrome 68 No Yes Yes Yes Yes *
Firefox 61 No Yes Yes Yes Yes
IE 11 No No No No No

WET enabled test cases

These include the polyfill details.js for IE11.

Results for Test 2018-6 - WET 4 behaviour with heading inside summary

No browsers match the expected behaviour, with either JAWS or NVDA.

With NVDA:

Chrome and Firefox do not voice the expand/collapse actions. IE11 (using the polyfill) has a different issue, described below.

Browser Headings list Buttons list Expandable / collapsible State voiced Expansion / collapse voiced
Expected Yes Yes Yes Yes Yes
Chrome 68 Yes Yes Yes Yes No
Firefox 61 Yes Yes Yes Yes No
IE 11 Yes Yes Yes * Yes Yes

With JAWS 2018:

Browser Headings list Buttons list Expandable / collapsible State voiced Expansion / collapse voiced
Expected Yes Yes Yes Yes Yes
Chrome 68 No Yes Yes Yes Yes
Firefox 61 No Yes Yes Yes Yes
IE 11 No Yes Yes Yes Yes

Results for Test 2018-7 - WET 4 behaviour with no heading inside summary

With NVDA:

Only IE11 (using the polyfill) matches the expected behaviour. Chrome and Firefox do not voice the expand/collapse actions.

Browser Headings list Buttons list Expandable / collapsible State voiced Expansion / collapse voiced
Expected No Yes Yes Yes Yes
Chrome 68 No Yes Yes Yes No
Firefox 61 No Yes Yes Yes No
IE 11 No Yes Yes Yes Yes

With JAWS 2018:

All browsers tested matched the expected behaviour.

Browser Headings list Buttons list Expandable / collapsible State voiced Expansion / collapse voiced
Expected No Yes Yes Yes Yes
Chrome 68 No Yes Yes Yes Yes
Firefox 61 No Yes Yes Yes Yes
IE 11 No Yes Yes Yes Yes

Proposed Omnifill

Inspired by accessible expanding / collapsing sections.

Content creators can continue to write their code using the native detail / summary model according to HTML specification. The native detail and summary elements are replaced onload with div and button elements respectively, and the expected behaviour is implemented on click and keydown events.

Why not keep the native detail / summary elements?

After many attempts and tests, no solution has been found that maintains the detail / summary elements.

Omnifill Performance

Replacing all 376 detail / summary elements in the Mandate Letter Tracker took 84ms on a HP EliteBook with i5-6300u processor in Firefox, without any visible flashing or reflows.

The omnifill makes one change to the DOM per details element:

detailsElement.parentNode.replaceChild( wrapperDiv, detailsElement );

Proposed Vanilla Omnifill Test Cases

The HTML markup of test cases is identical to the vanilla example above, apart from the addition of a javascript file and css file.

Results for Test 2018-4 - Proposed omnifill with heading inside summary

All browsers tested matched the expected behaviour, with both JAWS and NVDA.

With NVDA 2018:

Browser Headings list Buttons list Expandable / collapsible State voiced Expansion / collapse voiced
Expected Yes Yes Yes Yes Yes
Chrome 68 Yes Yes Yes Yes Yes
Firefox 61 Yes Yes Yes Yes Yes
IE 11 Yes Yes Yes Yes Yes

With JAWS 2018:

Browser Headings list Buttons list Expandable / collapsible State voiced Expansion / collapse voiced
Expected Yes Yes Yes Yes Yes
Chrome 68 Yes Yes Yes Yes Yes
Firefox 61 Yes Yes Yes Yes Yes
IE 11 Yes Yes Yes Yes Yes

Results for Test 2018-5 - Proposed omnifill with no heading inside summary

All browsers tested matched the expected behaviour, with both JAWS and NVDA.

With NVDA 2018:

Browser Headings list Buttons list Expandable / collapsible State voiced Expansion / collapse voiced
Expected No Yes Yes Yes Yes
Chrome 68 No Yes Yes Yes Yes
Firefox 61 No Yes Yes Yes Yes
IE 11 No Yes Yes Yes Yes

With JAWS 2018:

Browser Headings list Buttons list Expandable / collapsible State voiced Expansion / collapse voiced
Expected No Yes Yes Yes Yes
Chrome 68 No Yes Yes Yes Yes
Firefox 61 No Yes Yes Yes Yes
IE 11 No Yes Yes Yes Yes

Proposed WET-enabled Omnifill Test Cases

The HTML markup of test cases is identical to the WET example above, apart from the addition of a javascript file and css file.

Results for Test 2018-8 - Proposed WET omnifill with heading inside summary

All browsers tested matched the expected behaviour, with both JAWS and NVDA.

With NVDA 2018:

Browser Headings list Buttons list Expandable / collapsible State voiced Expansion / collapse voiced
Expected Yes Yes Yes Yes Yes
Chrome 68 Yes Yes Yes Yes Yes
Firefox 61 Yes Yes Yes Yes Yes
IE 11 Yes Yes Yes Yes Yes

With JAWS 2018:

Browser Headings list Buttons list Expandable / collapsible State voiced Expansion / collapse voiced
Expected Yes Yes Yes Yes Yes
Chrome 68 Yes Yes Yes Yes Yes
Firefox 61 Yes Yes Yes Yes Yes
IE 11 Yes Yes Yes Yes Yes

Results for Test 2018-9 - Proposed WET omnifill with no heading inside summary

All browsers tested matched the expected behaviour, with both JAWS and NVDA.

With NVDA 2018:

Browser Headings list Buttons list Expandable / collapsible State voiced Expansion / collapse voiced
Expected No Yes Yes Yes Yes
Chrome 68 No Yes Yes Yes Yes
Firefox 61 No Yes Yes Yes Yes
IE 11 No Yes Yes Yes Yes

With JAWS 2018:

Browser Headings list Buttons list Expandable / collapsible State voiced Expansion / collapse voiced
Expected No Yes Yes Yes Yes
Chrome 68 No Yes Yes Yes Yes
Firefox 61 No Yes Yes Yes Yes
IE 11 No Yes Yes Yes Yes

Proposed WET-enabled Omnifill Test Cases (less ARIA)

This example is identical to the previous WET-enabled omnifill, but the javascript file adds less ARIA code, specifically:

These attributes have been removed based on feedback gathered from usability testing with screen reader users.

Results for Test 2018-10 - Proposed WET omnifill with heading inside summary (less ARIA)

All browsers tested matched the expected behaviour, with both JAWS and NVDA.

With NVDA 2018:

Browser Headings list Buttons list Expandable / collapsible State voiced Expansion / collapse voiced
Expected Yes Yes Yes Yes Yes
Chrome 68 Yes Yes Yes Yes Yes
Firefox 61 Yes Yes Yes Yes Yes
IE 11 Yes Yes Yes Yes Yes

With JAWS 2018:

Browser Headings list Buttons list Expandable / collapsible State voiced Expansion / collapse voiced
Expected Yes Yes Yes Yes Yes
Chrome 68 Yes Yes Yes Yes Yes
Firefox 61 Yes Yes Yes Yes Yes
IE 11 Yes Yes Yes Yes Yes

Results for Test 2018-11 - Proposed WET omnifill with no heading inside summary (less ARIA)

All browsers tested matched the expected behaviour, with both JAWS and NVDA.

With NVDA 2018:

Browser Headings list Buttons list Expandable / collapsible State voiced Expansion / collapse voiced
Expected No Yes Yes Yes Yes
Chrome 68 No Yes Yes Yes Yes
Firefox 61 No Yes Yes Yes Yes
IE 11 No Yes Yes Yes Yes

With JAWS 2018:

Browser Headings list Buttons list Expandable / collapsible State voiced Expansion / collapse voiced
Expected No Yes Yes Yes Yes
Chrome 68 No Yes Yes Yes Yes
Firefox 61 No Yes Yes Yes Yes
IE 11 No Yes Yes Yes Yes