[badge] Add title elements to svg
Add title elements describing the svg for accessibility purposes. This is of limited use because the svg will be brought into an html document via the img element, but it could be useful if a visually impaired user accesses the svg directly. The title on each badge is just a statement of the badge name. While sparse, it's helpful because while the text elements of each badge contain this info, it's duplicated and split up and would not be easy to understand. Change-Id: Ia0a9b09221cf6bce029d1a5cee523efef201cf54
This commit is contained in:
parent
4479336dcf
commit
14e928bbf8
|
@ -42,10 +42,15 @@ SVG_ROOT = """<?xml version="1.0" standalone="no"?>
|
|||
<svg contentScriptType="text/ecmascript" zoomAndPan="magnify" contentStyleType="text/css"
|
||||
height="{height}" width="{width}" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg"
|
||||
version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title id="os:gov:badges:title">
|
||||
This is a container for a set of OpenStack badges indicating the status and
|
||||
features of this project and its repository
|
||||
</title>
|
||||
{svg}
|
||||
</svg>
|
||||
"""
|
||||
FLAT_BADGE_TEMPLATE = """<svg id="{left_text}:{right_text}" width="{width}" height="20" x="{svg_x}" y="{svg_y}">
|
||||
<title>{left_text}:{right_text}</title>
|
||||
<a target="_blank" xlink:href="{link}">
|
||||
<linearGradient id="smooth:{left_text}:{right_text}" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
|
|
Loading…
Reference in New Issue