Merge lp:~huwshimi/launchpad/remove-icon-alt-528367 into lp:launchpad

Proposed by Huw Wilkins
Status: Merged
Approved by: Huw Wilkins
Approved revision: no longer in the source branch.
Merged at revision: 12359
Proposed branch: lp:~huwshimi/launchpad/remove-icon-alt-528367
Merge into: lp:launchpad
Diff against target: 103 lines (+8/-8)
8 files modified
lib/canonical/launchpad/templates/launchpad-graphics.pt (+1/-1)
lib/lp/answers/templates/person-answer-contact-for.pt (+1/-1)
lib/lp/bugs/javascript/bugtask_index.js (+1/-1)
lib/lp/bugs/templates/bug-branch.pt (+1/-1)
lib/lp/bugs/templates/bug-portlet-dupe-subscribers-content.pt (+1/-1)
lib/lp/bugs/templates/bug-portlet-subscribers-content.pt (+1/-1)
lib/lp/code/templates/branch-macros.pt (+1/-1)
lib/lp/code/templates/branch-related-bugs-specs.pt (+1/-1)
To merge this branch: bzr merge lp:~huwshimi/launchpad/remove-icon-alt-528367
Reviewer Review Type Date Requested Status
Gavin Panella (community) Approve
Review via email: mp+48430@code.launchpad.net

Commit message

[r=allenap][bug=528367] Added alt tag to remove icons.

Description of the change

Added alt tag to remove icons.

To test find a remove icon (e.g. subscribe to bug and there will be a red remove icon on the right of your name) and view the source (or inspect the element) and the <img> tag should have the "alt" property set to "Remove".

To post a comment you must log in.
Revision history for this message
Jonathan Lange (jml) wrote :

Is there a way we can do this so that we don't have to remember to add the alt="" every time?

Revision history for this message
Gavin Panella (allenap) wrote :

+1, but I'm also interested to know if there's a simple answer to jml's question.

It looks like you've mixed up the Description of the Change and Commit Message field in the proposal. Before landing you might want to switch them around.

Also, there's no need to mention the bug number - though it's harmless - in the commit message. You've linked the bug to the branch already, and bin/ec2 land and bzr lp-land will add a [bug=$] part to your commit message automatically.

review: Approve
Revision history for this message
Huw Wilkins (huwshimi) wrote :

> Is there a way we can do this so that we don't have to remember to add the
> alt="" every time?

There's certainly no standard way of doing that. I guess we could do something like have a whole bunch of templates with img tags in them set up for each image and we just include that. However, I think it's just the nature of html to have alt tags on images. Personally I think it's something that should be picked up in UI reviews.

Gavin, thanks for your comments. I've fixed those things.

Revision history for this message
Gavin Panella (allenap) wrote :

> There's certainly no standard way of doing that. I guess we could do
> something like have a whole bunch of templates with img tags in them
> set up for each image and we just include that. However, I think
> it's just the nature of html to have alt tags on images. Personally
> I think it's something that should be picked up in UI reviews.

Agreed, I don't think the template thing would work; we'd have to
check that they're used in review anyway. But your review point made
me think...

We could have a linter to check these things. Without looking I'm
going to guess that there are over 100,000 html lint tools out there,
all of which melt when exposed to TAL.

However, a linter for just this could be botched together fairly
easily, and additional checks added as we go along. (Btw, I'm not
suggesting you do it.)

Consider filing a bug to add a template linter with an importance
roughly equal to how important alt attributes are to have on img tags.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/launchpad/templates/launchpad-graphics.pt'
2--- lib/canonical/launchpad/templates/launchpad-graphics.pt 2010-10-31 20:18:45 +0000
3+++ lib/canonical/launchpad/templates/launchpad-graphics.pt 2011-02-03 05:22:27 +0000
4@@ -413,7 +413,7 @@
5 </tr>
6 <tr>
7 <td>remove</td>
8- <td><img src="/@@/remove" /></td>
9+ <td><img src="/@@/remove" alt="Remove" /></td>
10 <td>Can be clicked to "remove" data from the system. Is sometimes
11 used as a bullet on an action menu item which results in data
12 removal, or in lists where clicking it will remove the data in that
13
14=== modified file 'lib/lp/answers/templates/person-answer-contact-for.pt'
15--- lib/lp/answers/templates/person-answer-contact-for.pt 2009-08-20 14:37:15 +0000
16+++ lib/lp/answers/templates/person-answer-contact-for.pt 2011-02-03 05:22:27 +0000
17@@ -16,7 +16,7 @@
18 tal:attributes="href question_target/fmt:url:answers"
19 tal:content="question_target/title">Project Title</a>
20 <tal:link condition="view/showRemoveYourselfLink">
21- <img src="/@@/remove" />&mdash;
22+ <img src="/@@/remove" alt="Remove" />&mdash;
23 <a id="project-setanswercontact" href="#"
24 tal:attributes="href string:${question_target/fmt:url}/+support-contact;
25 id string:${question_target/name}-setdirectanswercontact">
26
27=== modified file 'lib/lp/bugs/javascript/bugtask_index.js'
28--- lib/lp/bugs/javascript/bugtask_index.js 2011-01-21 05:10:55 +0000
29+++ lib/lp/bugs/javascript/bugtask_index.js 2011-02-03 05:22:27 +0000
30@@ -830,7 +830,7 @@
31 if (subscription.can_be_unsubscribed_by_user()) {
32 var icon_html = Y.Node.create(
33 '<a href="+subscribe">' +
34- '<img class="unsub-icon" src="/@@/remove" /></a>');
35+ '<img class="unsub-icon" src="/@@/remove" alt="Remove" /></a>');
36 icon_html
37 .set('id', 'unsubscribe-' + terms.css_name)
38 .set('title', 'Unsubscribe ' + terms.full_name);
39
40=== modified file 'lib/lp/bugs/templates/bug-branch.pt'
41--- lib/lp/bugs/templates/bug-branch.pt 2009-11-13 03:05:26 +0000
42+++ lib/lp/bugs/templates/bug-branch.pt 2011-02-03 05:22:27 +0000
43@@ -23,7 +23,7 @@
44 tal:attributes="
45 href string:${branch/fmt:url}/+bug/${bug/id}/+delete;
46 id string:bugbranch-${bug_branch/id}-delete;">
47- <img src="/@@/remove"/>
48+ <img src="/@@/remove" alt="Remove"/>
49 </a>
50 <div tal:repeat="proposal view/merge_proposals" class="reviews">
51 <tal:merge-fragment tal:replace="structure proposal/@@+summary-fragment"/>
52
53=== modified file 'lib/lp/bugs/templates/bug-portlet-dupe-subscribers-content.pt'
54--- lib/lp/bugs/templates/bug-portlet-dupe-subscribers-content.pt 2010-09-02 22:55:21 +0000
55+++ lib/lp/bugs/templates/bug-portlet-dupe-subscribers-content.pt 2011-02-03 05:22:27 +0000
56@@ -41,7 +41,7 @@
57 class python: view.getSubscriptionClassForUser(subscription.person)
58 "
59 >
60- <img class="unsub-icon" src="/@@/remove"
61+ <img class="unsub-icon" src="/@@/remove" alt="Remove"
62 tal:attributes="id string:unsubscribe-icon-${subscription/css_name}" />
63 </a>
64 </div>
65
66=== modified file 'lib/lp/bugs/templates/bug-portlet-subscribers-content.pt'
67--- lib/lp/bugs/templates/bug-portlet-subscribers-content.pt 2009-12-18 20:54:13 +0000
68+++ lib/lp/bugs/templates/bug-portlet-subscribers-content.pt 2011-02-03 05:22:27 +0000
69@@ -39,7 +39,7 @@
70 class python: view.getSubscriptionClassForUser(subscription.person)
71 "
72 >
73- <img class="unsub-icon" src="/@@/remove"
74+ <img class="unsub-icon" src="/@@/remove" alt="Remove"
75 tal:attributes="id string:unsubscribe-icon-${subscription/css_name}" />
76 </a>
77
78
79=== modified file 'lib/lp/code/templates/branch-macros.pt'
80--- lib/lp/code/templates/branch-macros.pt 2011-01-20 04:27:38 +0000
81+++ lib/lp/code/templates/branch-macros.pt 2011-02-03 05:22:27 +0000
82@@ -123,7 +123,7 @@
83 class="delete-buglink"
84 tal:attributes="href string:+bug/${bug/id}/+delete;
85 id string:delete-buglink-${bug/id}">
86- <img src="/@@/remove"/>
87+ <img src="/@@/remove" alt="Remove"/>
88 </a>
89 </td>
90 </tr>
91
92=== modified file 'lib/lp/code/templates/branch-related-bugs-specs.pt'
93--- lib/lp/code/templates/branch-related-bugs-specs.pt 2010-10-19 01:24:36 +0000
94+++ lib/lp/code/templates/branch-related-bugs-specs.pt 2011-02-03 05:22:27 +0000
95@@ -22,7 +22,7 @@
96 class="delete-buglink"
97 tal:attributes="href string:+bug/${bug/id}/+delete;
98 id string:delete-buglink-${bug/id}">
99- <img src="/@@/remove"/>
100+ <img src="/@@/remove" alt="Remove"/>
101 </a>
102 </tal:buglink-edit>
103 </li>