The <aside> element is not supported by IE 8 and later. This means that any styles installed on it are lost in these browsers. You can partially get around this using JavaScript code that โteachesโ the element to them, but is it all worth it? What is expected profit?
Logically, the described usage does not match the semantics of HTML5. The descriptions there are vague, but I donโt think that the error message can be described as tangential when it is displayed and relevant; this is really key content. It is not separate from the rest of the content; instead, he expresses important information about it.
Advertising will be a candidate for <aside> , and so there will be a joke, a story note or content in general that is not necessarily in any way, but has some connection with the main content.
I have not seen any evidence of any software such as search engines or browsers or browser add-ons that actually use <aside> markup. Just thinking about what you can do.
I think this is a fundamental flaw in the overall design, an even more theoretical question about the semantics of elements. What happens when CSS or JavaScript is disabled? Correctly, the user always sees an error message even if he does not enter input at all, or if the input is correct.
The best approach, assuming this is about errors detected in the client code, is to save the error message text only in JavaScript lines. When an error is detected, a new element is added or the existing content of the element is changed to make the error message available; and then it will be destroyed when the error is corrected. (No need to rely on CSS here.)
Thus, an error message can be placed in front of or below the field to the right of it. It doesn't matter what elements you use for it (search engines donโt see this, and browsers are unlikely to do anything special with it on their own), but <div><strong>...</strong></div> probably would be a good choice.
source share