Yes, it is possible to add html attribute tags using set attribute widget which can be found on app store. You can change any html attributes using this widget. Please see an example below based on your question;
1. Download set attribute widget from Mendix app store
2. Add a container on the page and give it a class name for example mainContent
3. Add SetAttribute widget below the container, in Dom Query enter .mainContent. Then click on New button > in attribute field enter 'role' and in value field enter 'main'.
4. Add another container for search fields and give it a class name for example searchFields
5. Repeat step3. That is add SetAttribute widget below the container, in Dom Query enter .searchFields. Then click on New button > in attribute field enter 'role' and in value field enter 'search'.
Hi Wieke BoutenWieke Bouten,
Not exatly. I want to put in a DIV the tag role. This provide to screen readers the purpose of content, helping blind people to use the system.
- "role=banner" for headers;
- "role=main" for the main content of the page;
- "role=navigation" for a menu, or usefull links;
- "role=contentinfo" for footnotes
The generated HTML of Mendix is very good, and helps a lot theese readers. But I don't find how to put some tags like I said before.
I tried to use a HTMLSnippet, but didn't work.
Do you mean that you want to hide/show elements on a page depending on the role of the user? Because that is certainly possible: almost all elements on a page can be made 'conditionally visible' based on, among other, user role: