nui
nui copied to clipboard
Core experience of demo/demo.htm is broken
The key principle of progressive enhancement is that core functionality works without JavaScript. Web development best practices note that if you have functionality that requires JavaScript, that you insert it into the DOM using JavaScript, such that if the JavaScript is unavailable (for a whole shedful of uncontrollable reasons), the page continues to function, and is not in a broken state.
But the demo page at demo / demo.htm - there are three links in the ol.nui-tabs that do not function as expected. If these links require JavaScript to function, then they need to be injected with JavaScript. Otherwise they should be linking to proper URLs, like separate documents, or fragment identifiers in the page.
At the moment, the HTML still requires JavaScript to cover over this breakage, so it is not currently a good example of progressive enhancement.
The correct approach depends on the content of the tabs, if all of the tab-panel content is deemed core experience, then that content needs to be available without JavaScript, whether it's the tab panels unrolled one after the other, or a server side implementation of the tab panel.