Last modified: 2014-02-12 23:52:52 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 T36025, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34025 - Mobile version of Wikipedia requires JavaScript to view sections
Mobile version of Wikipedia requires JavaScript to view sections
Status: RESOLVED FIXED
Product: MobileFrontend
Classification: Unclassified
stable (Other open bugs)
unspecified
All All
: Low normal
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-29 23:43 UTC by Tom Morris
Modified: 2014-02-12 23:52 UTC (History)
11 users (show)

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


Attachments

Description Tom Morris 2012-01-29 23:43:32 UTC
Currently, on en.m.wikipedia.org, the sections are being hidden by setting display: none in the CSS, then having JavaScript buttons to show the content. This means if you are viewing the page on a mobile device that doesn't support JavaScript, you can't view the sections.

Instead, it might be better to remove the display: none from the CSS, and have the JavaScript hide (and unhide) the content if JavaScript is available. That means it'll be accessible even without JavaScript.

Steps to replicate.
1. Open your favourite browser.
2. Turn off JavaScript.
3. Go to http://en.m.wikipedia.org/ and go to an article.
4. Enjoy not being able to read any of the sections.
Comment 1 Patrick Reilly 2012-01-31 01:22:32 UTC
This is NOT the case.

If you have a device that doesn't support Javascript we don't collapse the sections.
For example: If I set my user-agent to "Yahoo Slurp e.g., Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)"  and request: http://en.m.wikipedia.org/wiki/Buffalo_nickel
I get a page without the sections collapsed.

I suppose that we could tweak this to only collapse the sections if we detect javascript as being enabled.

— Patrick
Comment 2 Brion Vibber 2012-02-06 19:07:27 UTC
It is generally possible to disable JavaScript in browsers that support it, so I'd recommend only collapsing if JS is on. (This can be done by adding a CSS rule in a <script> block pretty easily I think)
Comment 3 Jon 2012-02-13 12:06:41 UTC
This should be as simple as adding a bit of javascript that adds to the body tag a 'jsEnabled' class.

Then adding the following css rules:
button.show {
	display: none;
}

.jsEnabled button.show {
	display: inline-block;
}

.jsEnabled .content_block,
.jsEnabled .section_anchors,
button.section_heading.hide {
	display: none;
}
Comment 4 Jon 2012-02-16 17:09:21 UTC
Addressed in r111651.

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


Navigation
Links