details-polyfill
details-polyfill copied to clipboard
Polyfill for the HTML5 <details> element, no dependencies
The polyfill tries to load itself immediately, which can cause errors if the DOM isn't loaded yet. This PR implements a check to see if the DOM is loaded and...
See other polyfills for details/summary for more information on accessibility here. A lengthy explanation can be found at https://www.smashingmagazine.com/2014/11/complete-polyfill-html5-details-element/ although it's out of date as to which browsers support details/summary.
There is an issue with the way Edge displays "black right pointing triangle" character that is used for "closed" state caret. Basically with default font, Edge displays blue square with...
Fix typo
That’s it :octocat:
For example: ` Donec ac odio tempor orci. Sed sed risus pretium quam celeri? Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et...
It appears that the polyfill doesn't provide any keyboard accessibility to toggle the details element. I tried adding `tabindex=0` to the `` element, which makes it focusable but not toggleable....
The native `` element triggers a `toggle` action whenever it is toggled. Something like the following might work: ```js function clickHandler (e) { if (e.target.nodeName.toLowerCase() === 'summary') { var details...
``` TypeError: null is not an object (evaluating 'document.body.appendChild') ``` because `document.body` is currently `null` due to `document.readyState === "loading"`.
Due to the `` element not being block-level by default. **Edit:** Should this be handled by this library, or by the project? We already have to do such with ``....