feat: match existing behaviour, add docs - #5
Conversation
Release-As: 1.0.0
|
This appears to work as expect. However, I'm just not sure I understand the benefit over using the native details/summary. For example, as you mentioned before, the details/summary supports full page search. An additional point of consideration is around reader mode, which may prevent the JavaScript from running. I've been having trouble testing this completely as FireFox doesn't seem to want to open my localhost served content in reader mode. And the floe page I was testing with also didn't open in reader mode in Safari. So not sure if there are some issues with the page setups or other things. ResultsVisiting demo page on localhostUsing a modified version of the demo, but adding in extra markup structure such as Visit the page and enable the browser's Reader mode/view.
Visiting Inverted Word Clouds from Floe Project siteVisited the Inverted Word Clouds news article on the Floe site; which includes a details/summary element. No inclusive-disclosure widget to test. Visit the page and enable the browser's Reader mode/view.
|
npm run testwithout errorsnpm run buildwithout errorsDescription
hiddenattribute to show/hide content instead of CSS.Steps to test
npm startExpected behavior: Button shows/hides content as expected.
Additional information
Brief explanation of code removed here and added here:
(See relevant docs.)
The toggle for the disclosure needs to be the
firstElementChildso that's preferable than a selector but we need to ensure that it's a button, hence the change. The customconsole.warnwith the Elena prefix is meant to match other console warnings that Elena omits for consistency.Related issues
Not provided