Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork270
Description
CHeader
,CFooter
andCSidebar
components render as<div>
by default, but rendering them as<header>
,<footer>
and<aside>
respectively would be semantically more correct. Furthermore, there should be an optional propertyas
to change the component element when needed. We could just add the property to make it backward compatible, but I do believe these components should use correct HTML elements by default.
AlsoCSidebarNav
andCNav
should be rendered asnav
HTML elements. Adding optionalas
property would also be beneficial.
Possibly a separate issue
Similar issue exists withCModal
component, we should consider refactoring it to be usingdialog
element, although that has some constraints in a sense that thedialog
is positioned at the "Top Layer" and has it's own ordering, meaning we can't position any other element above it. On top of that, we should render modals (or at least consider) through React portals, as they shouldn't be embedded into the existing content. That is neither semantically correct and it can cause issues (for instance modal has a form and is rendered in another form). Here's just oneexample. But this can be considered a separate issue.