Files
odoo_source/addons/website_forum_doc/views/doc.xml
T
kujiu 9de1bc0eef [IMP] Improve compatibility with screen readers (accessibility) (#24574)
Today, Odoo is really tricky to use without seeing the screen, it must be improved to be usable.

This PR forbid to use labels without a "for" attribute, add some title, rule and aria attributes in HTML. With that, Odoo will be fully usable with a screen reader.


* [IMP] Labels must have a for attribute. Improve accessibility.
* [IMP] Better error message when trying to read a missing cached value
* [FIX] Add some aria-label and title attributes for screen readers.
* [FIX] Template name is not included in the error message in case of SyntaxError in QWeb
* [FIX] Improve the Tour failed at step error message to be more explicit.
* [IMP] Add aria-labels
* [FIX] Add missing aria-label on failing test
* [IMP] aria-hidden means hidden. Fix all bad aria-hidden and hide aria-hidden for all.
* [IMP] Color names on kanban views and many2many tags
* [IMP] Add some checks on views for accessibility.
* [IMP] Add `alt` attribute on `img` tags.
* [IMP] Add aria-label and title on non-described icons
* [IMP] Add button role to widgets with btn class
* [IMP] Translate aria and formatted attributes.
* [IMP] Remove wrong aria-labelledby
* [IMP] Add menu role on dropdowns
* [IMP] Buttons must be focusable
* [IMP] Add aria attributes on progress bars
* [IMP] Improve accessibility of basic widgets
* [IMP] Change main layout to more semantic tags
* [IMP] Add menuitem role when missing
* [IMP] Remove wrong role='presentation'
* [IMP] Improve accessibility of tab panels
* [IMP] Add aria-invalid on invalid fields
* [IMP] Add aria-sort on ordered columns
* [IMP] Add role on alerts
* [IMP] Use dialog role, header, main and footer tags for modals
* [IMP] Add labels on o_status
* [IMP] Improve accessibility of kanban view with feeds and articles
* [IMP] Add alerts in case of new messages
* [IMP] Add widget, navigation or img role to aria-labelled items
2018-06-22 21:22:21 +02:00

103 lines
5.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- DOCUMENTATION TOC VIEWS -->
<record id="view_documentation_toc_list" model="ir.ui.view">
<field name="name">forum.documentation.toc.list</field>
<field name="model">forum.documentation.toc</field>
<field name="arch" type="xml">
<tree string="Documentation TOC" editable="bottom">
<field name="sequence" widget="handle"/>
<field name="name"/>
<field name="forum_id"/>
<field name="parent_id"/>
</tree>
</field>
</record>
<record id="action_documentation_toc" model="ir.actions.act_window">
<field name="name">Documentation</field>
<field name="res_model">forum.documentation.toc</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
</record>
<menuitem id="menu_documentation"
parent="website_forum.menu_website_forum" groups="base.group_user"
name="Documentation ToC" action="action_documentation_toc" sequence="20"/>
<!-- Project Task Kanban View -->
<record id="view_forum_post_kanban" model="ir.ui.view">
<field name="name">forum.post.kanban</field>
<field name="model">forum.post</field>
<field name="arch" type="xml">
<kanban default_group_by="documentation_stage_id" >
<field name="documentation_stage_id"/>
<field name="create_uid"/>
<field name="color"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
<div class="o_dropdown_kanban dropdown" groups="base.group_user">
<a role="button" class="dropdown-toggle btn" data-toggle="dropdown" href="#" aria-label="Dropdown menu" title="Dropdown menu">
<span class="fa fa-ellipsis-v"/>
</a>
<ul class="dropdown-menu" role="menu">
<li t-if="widget.editable"><a type="edit" role="menuitem">Edit Post</a></li>
<li t-if="widget.deletable"><a type="delete" role="menuitem">Delete</a></li>
<li role="menuitem" aria-haspopup="true"><ul role="menu" class="oe_kanban_colorpicker" data-field="color"/></li>
</ul>
</div>
<div class="o_kanban_record_top">
<b class="o_kanban_record_title"><field name="name"/></b>
</div>
<div class="o_kanban_record_bottom">
<div class="oe_kanban_bottom_left"/>
<div class="oe_kanban_bottom_right">
<img t-att-src="kanban_image('res.users', 'image_small', record.create_uid.raw_value)" t-att-title="record.create_uid.value" t-att-alt="record.create_uid.value" width="24" height="24" class="oe_kanban_avatar"/>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="action_forum_doc_post" model="ir.actions.act_window">
<field name="name">Documentation Posts</field>
<field name="res_model">forum.post</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="domain">[('documentation_toc_id','!=', False)]</field>
</record>
<menuitem id="menu_forum_doc_posts"
parent="website_forum.menu_website_forum" name="Documentation Posts"
action="action_forum_doc_post" sequence="25"/>
<record id="view_forum_post_doc_form" model="ir.ui.view">
<field name="name">forum.post.form.doc</field>
<field name="model">forum.post</field>
<field name="inherit_id" ref="website_forum.view_forum_post_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='parent_id']" position="after">
<field name="documentation_toc_id"/>
</xpath>
<xpath expr="//sheet" position="before">
<header>
<field name="documentation_stage_id" widget="statusbar"/>
</header>
</xpath>
</field>
</record>
<record id="view_forum_post_doc_list" model="ir.ui.view">
<field name="name">forum.post.list.doc</field>
<field name="model">forum.post</field>
<field name="inherit_id" ref="website_forum.view_forum_post_list"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='forum_id']" position="after">
<field name="documentation_toc_id"/>
</xpath>
</field>
</record>
</odoo>