I would like to improve the accessibility in a blog I'm working on. The blog is bilingual, and by default appears in Hungarian. A click on a flag triggers the language change (JavaScript removes nodisplay
class from divs with class=js-en
and adds it to divs with class=js-hu
).
I would like to separate the two parts of each article. I have considered using <aside>
, but it wouldn't be accurate (when viewed in English, it is also primary blog content).
What do you suggest to improve the accessibility, with valid tags and ARIA roles?
Posts look something like this:
[Edit: changed <div class="js-en nodisplay">
to <div class="js-en" hidden>
]
<article>
<div class="js-hu"> <!-- blog post in Hungarian -->
<p>
magyar szöveg, nem értenéd
</p>
</div>
<div class="js-en" hidden> <!-- blog post in English -->
<p>
same text in English
</p>
</div>
</article>