Last modified: 2014-02-12 23:55:26 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T32829, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30829 - Search button is not visible with images disabled on Samsung Jet.
Search button is not visible with images disabled on Samsung Jet.
Status: RESOLVED WONTFIX
Product: MobileFrontend
Classification: Unclassified
stable (Other open bugs)
unspecified
Other other
: Normal normal
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-09 04:05 UTC by Max Semenik
Modified: 2014-02-12 23:55 UTC (History)
11 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Suggested patch for seeing search button label with images disabled (3.61 KB, patch)
2012-03-07 16:57 UTC, Jon
Details
Fix using javascript (2.76 KB, patch)
2012-03-28 12:11 UTC, Jon
Details

Description Max Semenik 2011-09-09 04:05:26 UTC
Thus, can't search. Disabling images could be essential on slow connections or when roaming. This is not a regression from a MobileFrontend switchover, the old Ruby gateway was broken, too.
Comment 1 Jon 2012-03-07 16:57:20 UTC
Created attachment 10190 [details]
Suggested patch for seeing search button label with images disabled

CSS background images should only be for aesthetic value and should not give meaning to an element. The search icon should thus probably be an img tag with alternate text so that when images are disabled the alt text will be seen instead.

Thoughts?
Comment 2 Max Semenik 2012-03-07 17:18:25 UTC
Now there's gray rectangle clicking on which works, but no "Search" text.
Comment 3 Sumana Harihareswara 2012-03-07 18:10:37 UTC
(In reply to comment #2)
> Now there's gray rectangle clicking on which works, but no "Search" text.

Thus marking patch as reviewed.
Comment 4 Jon 2012-03-28 12:11:13 UTC
Created attachment 10341 [details]
Fix using javascript

This fix adds javascript that tries to create an image using a data uri. If the image successfully loads with a height other than 0 then a class is added to the body that can be used to add the negative text indent that hides the label. If javascript is disabled the text indent will remain at 0 so the label will be visible.

The only down side of this patch is if the browser doesn't support data uris then the search button will have the text 'Go' over the icon on browsers which have got images enabled.

Would appreciate review of this as a solution.
Comment 5 Jon 2012-04-13 10:51:40 UTC
Possibly fixed without relying on javascript - https://gerrit.wikimedia.org/r/4850
Waiting on MaxSem to confirm and close.
Comment 6 Max Semenik 2012-04-22 11:25:16 UTC
Still broken.
Comment 7 Jon 2012-04-23 16:36:28 UTC
I think there is no ideal fix for this apart from damaging the design. By that I mean changing the search button from a search icon to the text 'search'/'go'

Different mobile browsers disable images in different ways.
I knocked up this page to demonstrate - http://jonrobson.me.uk/wikipedia/text-indent-test.html

With images disabled on my browser I do not see the alt text of the first or second image. I consider that pretty bad and a fault of my browser.

I see nothing for solution 3 but that is expected as I have no background image and a text-indent defined.
If I remove the text indent as in solution 4, I see the label - however this solution requires javascript so I either display the text 'go' over the search icon for users with javascript disabled and images enabled or I show the text 'go' to users with javascript enabled and images disabled.

Solution 5 although not showing any text shows a border showing it is a button. Google uses this and I think it is acceptable.

On Nokia N95 I see the alt text of solution 1 and 2 and 3, 4 and 5 work the same as above. As a result on a Nokia N95 with images disabled the search button is readable.

We can do one of solution 4 or 5 but I don't wish to spend more time on this problem as I don't think it is completely solvable....
Comment 8 Jon 2012-05-01 12:03:38 UTC
Another option would be (if possible) for the php code to add a class imagesDisabled to the html tag for browsers which have images disabled. Styling can then do the rest.

I'm not sure how possible this is...
Comment 9 Jon 2012-05-11 16:04:48 UTC
Search button is disappearing in new navigation so closing.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links