Files
odoo_source/addons/website/views/snippets/s_text_image.xml
T
Samuel Degueldre 807ac81144 [IMP] web_editor, *: set image alt automatically, remove useless alts
*: website, web_unplash

The html alt attribute is supposed to contain a description of an
image's content (an alternative to the visual representation), a lot of
snippets contained alt attributes that were not descriptive of their
content, and would as such be counter-productive in terms of
accessibility. This commit removes those.

Previously, the alt attribute on img tags had to be set manually by the
user through the editor. This commit makes use of the description field
on ir.attachment to store image description, and sets the alt attribute
on images to that description when choosing an image from the media
dialog.

task-2091417
closes odoo/odoo#45174

Related: odoo/enterprise#9520
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-30 11:07:10 +00:00

23 lines
941 B
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="s_text_image" name="Text - Image">
<section class="s_text_image pt32 pb32">
<div class="container">
<div class="row align-items-center">
<div class="col-lg-6 pt16 pb16">
<h2>A Section Subtitle</h2>
<p>Write one or two paragraphs describing your product or services. <br/>To be successful your content needs to be useful to your readers.</p>
<p>Start with the customer – find out what they want and give it to them.</p>
<p><a href="#" class="btn btn-primary">Learn more</a></p>
</div>
<div class="col-lg-6 pt16 pb16">
<img src="/web/image/website.s_text_image_default_image" class="img img-fluid mx-auto" alt=""/>
</div>
</div>
</div>
</section>
</template>
</odoo>