WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 3 months ago

#18900 closed enhancement (wontfix)

Add a few more hide-if-no-js classes

Reported by: johnbillion Owned by: rianrietveld
Milestone: Priority: normal
Severity: normal Version: 3.3
Component: Administration Keywords: needs-testing has-patch
Focuses: ui, accessibility Cc:

Description

There are a few elements to which we could add the hide-if-no-js class, as their functionality or setting relies on JavaScript being available.

Attachments (8)

18900.patch (3.0 KB) - added by johnbillion 5 years ago.
18900.2.patch (570 bytes) - added by johnbillion 4 years ago.
18900-header-bg.diff (1.6 KB) - added by DrewAPicture 4 years ago.
Choose from Media Library links
18900-header-bg.2.diff (1.8 KB) - added by DrewAPicture 4 years ago.
Simplifies the UI, no empty space if no-js
18900-header-bg.3.diff (1.7 KB) - added by DrewAPicture 4 years ago.
Only introduce one new string, not two.
18900-header-bg.3.1.diff (2.4 KB) - added by DrewAPicture 4 years ago.
Combines with 18900.2.patch
18900.3.patch (2.4 KB) - added by Mte90 4 months ago.
patch refreshed
18900.4.patch (2.4 KB) - added by Mte90 4 months ago.
only double quotes for classes

Download all attachments as: .zip

Change History (28)

@johnbillion
5 years ago

#1 @johnbillion
5 years ago

  • Keywords has-patch added

Patch. Hides the Press This link and two user settings which need JavaScript to function.

#2 @nacin
5 years ago

Does Press This actually need JS? Many probably selectively disable JavaScript at the domain level, rather than the browser level. I'm thinking that a browser bookmarklet may still work in the case of NoScript/AdBlock, etc.

#3 @azaozz
5 years ago

The current implementation of Press This needs JS enabled for both domains, the WP install and the visited site. However if NoScript is used it's trivial to enable JS temporarily and use Press This.

@johnbillion
4 years ago

#4 @johnbillion
4 years ago

Attached patch adds 'hide-if-no-js' class to the "Edit Image" button when viewing a media item, as image editing required JS.

@DrewAPicture
4 years ago

Choose from Media Library links

#6 @DrewAPicture
4 years ago

  • Cc xoodrew@… added

18900-header-bg.diff hides the 'Choose Image' button (from Media Library) on Custom Header & Custom Background pages. I left the direction label and added a "You need javascript to do this" message: http://cl.ly/image/3A3l2H420g40

Last edited 4 years ago by DrewAPicture (previous) (diff)

@DrewAPicture
4 years ago

Simplifies the UI, no empty space if no-js

#7 @DrewAPicture
4 years ago

18900-header-bg.2.diff Simplifies the UI, removes the entire <p> block if no-js and displays message instead: http://cl.ly/image/2a1C1u0L1J2A

Last edited 4 years ago by DrewAPicture (previous) (diff)

@DrewAPicture
4 years ago

Only introduce one new string, not two.

@DrewAPicture
4 years ago

Combines with 18900.2.patch

#8 @SergeyBiryukov
3 years ago

#24321 was marked as a duplicate.

#9 @nacin
3 years ago

  • Component changed from Accessibility to Administration
  • Focuses ui accessibility added

#10 @chriscct7
12 months ago

  • Keywords needs-refresh needs-testing added; has-patch removed
  • Severity changed from minor to normal

This ticket was mentioned in Slack in #accessibility by rianrietveld. View the logs.


6 months ago

#12 @rianrietveld
6 months ago

  • Milestone changed from Awaiting Review to 4.6

#13 @rianrietveld
6 months ago

  • Owner set to rianrietveld
  • Status changed from new to assigned

@Mte90
4 months ago

patch refreshed

#14 @Mte90
4 months ago

  • Keywords has-patch added; needs-refresh removed

Refreshed the patch with the latest 4.6 branch.

This ticket was mentioned in Slack in #core by chriscct7. View the logs.


4 months ago

#16 @chriscct7
4 months ago

In 18900.3.patch src/wp-admin/includes/media.php should use double quotes to enclose the classes for consistency

@Mte90
4 months ago

only double quotes for classes

#17 @Mte90
4 months ago

Fixed :-)

This ticket was mentioned in Slack in #core by voldemortensen. View the logs.


4 months ago

#19 @ocean90
4 months ago

  • Keywords close added

@Mte90, @chriscct7: src/wp-admin/includes/media.php requires single quotes because the string is wrapped with double quotes.

18900.4.patch adds the classes only to deprecated functionality. themes.php?page=custom-background and themes.php?page=custom-header are only accessible when JS is disabled. We could add the class to the buttons but I don't think that the extra message is necessary.

The class inget_media_item() seems to be useless because the whole media stuff requires JS to work properly. You can test this by opening wp-admin/media-upload.php?type=image&tab=type in a new tab. Append &post_id=$post_id to get the media of a specific post.

#20 @ocean90
3 months ago

  • Keywords close removed
  • Milestone 4.6 deleted
  • Resolution set to wontfix
  • Status changed from assigned to closed

Going to close this as a wontfix. If there is a place which really requires a hide-if-no-js class a new ticket should be opened.

Note: See TracTickets for help on using tickets.