Commit Graph

17 Commits

Author SHA1 Message Date
Sergey Biryukov
001ffe81fb Docs: Improve inline comments per the documentation standards.
Includes minor code layout fixes for better readability.

See #48303.
Built from https://develop.svn.wordpress.org/trunk@47122


git-svn-id: http://core.svn.wordpress.org/trunk@46922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-29 00:45:18 +00:00
Andrea Fercia
4ead9880b0 Accessibility: Make the Tags meta box better support Input Method Editor (IME) converters.
Also, restores the keyboard interaction behavior prior to [41988] by requesting one single Enter key press to add a tag.

Props ryanshoover, miyauchi.
Fixes #45371.

Built from https://develop.svn.wordpress.org/trunk@45227


git-svn-id: http://core.svn.wordpress.org/trunk@45036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-17 07:18:51 +00:00
omarreiss
bdbaccce37 General: Explicitly assigns all JS globals to the window.
Many variables in the JavaScript were defined in the global scope without being explicitly assigned to the window. When built with Webpack, the code gets encapsulated in anonymous functions and those implicit globals get assigned to the wrong scope. This patch prevents that from happening.

Fixes #44371. See #43731.

Built from https://develop.svn.wordpress.org/trunk@43577


git-svn-id: http://core.svn.wordpress.org/trunk@43406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-19 13:33:24 +00:00
atimmer
bde558be2f Docs: Add file doc @output annotations.
These annotations make it clear to the reader of a JavaScript source
where the build process outputs to. These annotations can later be
integrated in a webpack configuration. This way there is one source of
truth.

The `build` folder is omitted from the paths, because a single JS file
shouldn't not be responsible of knowing where outputs in general will
end up at. A file only knows its output location relative to the
project.

Props adamsilverstein, herregroen, omarreiss, pento.
Fixes #44361.

Built from https://develop.svn.wordpress.org/trunk@43347


git-svn-id: http://core.svn.wordpress.org/trunk@43175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:30:15 +00:00
atimmer
f111796282 Docs: Improve JSDoc for wp-admin/js/tags-box.js.
Props carolinegeven, andizer, ireneyoast, herregroen, jjcomack.
Fixes #43499.

Built from https://develop.svn.wordpress.org/trunk@42963


git-svn-id: http://core.svn.wordpress.org/trunk@42792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-06 07:47:32 +00:00
Sergey Biryukov
4c16522bbe Taxonomy: Use keypress instead of keyup for listening for Enter key to add a tag via Tags meta box.
Fixes issue with Japanese input.

Props miyauchi.
Fixes #42234.
Built from https://develop.svn.wordpress.org/trunk@41988


git-svn-id: http://core.svn.wordpress.org/trunk@41822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 11:30:49 +00:00
Sergey Biryukov
4db08514ea Taxonomy: Convert tag cloud in Tags meta box to a list (<ul>) for better semantics and accessibility.
An unordered list allows screen reader users to know in advance how many tags are within the list.

Props audrasjb, afercia.
Fixes #40187.
Built from https://develop.svn.wordpress.org/trunk@41563


git-svn-id: http://core.svn.wordpress.org/trunk@41396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-22 11:28:44 +00:00
John Blackbourn
9092fd01e1 Taxonomy: Correct the formatting of HTML entities when generating the screen reader text for tag removal.
Props adamsilverstein

Built from https://develop.svn.wordpress.org/trunk@40181


git-svn-id: http://core.svn.wordpress.org/trunk@40120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-06 13:14:41 +00:00
Andrea Fercia
5c555e5d10 Accessibility: Improve the Tags meta box accessibility.
- changes the "X" links in buttons, improves their color contrast ratio and focus style
- adds screen reader text "Remove item: + tagname"
- uses `wp.a11y.speak()` to give screen reader users feedback when adding/removing tags
- makes the `tagcloud-link` toggle a button, with an `aria-expanded` attribute to indicate the tag cloud collapsed/expanded state
- changes colors for the autocomplete highlighted option in order to have a better color contrast ratio
- reduces the font size for the autocomplete on Press This
- removes CSS related to the old `suggest.js` from Press This

Props joedolson, cgrymala, azaozz, afercia.
Fixes #27555.

Built from https://develop.svn.wordpress.org/trunk@38880


git-svn-id: http://core.svn.wordpress.org/trunk@38823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-23 18:16:42 +00:00
Andrew Ozz
d91da52588 Accessible Tags autocomplete:
- Replace suggest.js with UI Autocomplete.
- Use the same settings like in the editor link toolbar.
- Abstract it and add in a new file, tags-suggest.js. Then make it a dependency for the Tags postbox(es) and Quick and Bulk Edit.
- Add `data-wp-taxonomy` on all input elements to improve handling in the UI for custom taxonomies.

Props afercia, azaozz.
See #33902.
Built from https://develop.svn.wordpress.org/trunk@38797


git-svn-id: http://core.svn.wordpress.org/trunk@38740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 22:40:28 +00:00
Sergey Biryukov
e0af554638 Tags: Avoid a double trailing space after tags separator in auto-suggest.
Props afercia.
Fixes #33881.
Built from https://develop.svn.wordpress.org/trunk@35292


git-svn-id: http://core.svn.wordpress.org/trunk@35258 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-20 16:00:30 +00:00
Boone Gorges
bc3d8197aa When saving post, ensure that non-hierarchical taxonomy input is defined before attempting to parse it.
Taxonomy metaboxes that are disabled for the current user are included in the
post.php markup, but do not contain the 'newtag' field, and so should be
skipped when looping through the metaboxes to avoid invoking String methods
on a variable of type `undefined`.

Props MikeNGarrett, A5hleyRich.
Fixes #30859.
Built from https://develop.svn.wordpress.org/trunk@31895


git-svn-id: http://core.svn.wordpress.org/trunk@31874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-26 01:23:28 +00:00
Andrew Ozz
7c65a95e4b Fix tagBox init on the Edit Post screen. Props tyxla. Fixes #31558.
Built from https://develop.svn.wordpress.org/trunk@31675


git-svn-id: http://core.svn.wordpress.org/trunk@31656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-08 04:54:26 +00:00
Helen Hou-Sandí
513a038159 Remove the once-placeholder-esque "tag hint", which has not worked in quite some time.
It's not particularly useful, and adds visual noise when in place.

props welcher.
fixes #31485.

Built from https://develop.svn.wordpress.org/trunk@31607


git-svn-id: http://core.svn.wordpress.org/trunk@31588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-03 21:53:25 +00:00
Andrew Ozz
4593319ea7 PressThis: accessibility enhancements:
- Add missing form labels.
- Add some screen-reader-text and aria-hidden attributes.
- Focus handling improvements.
- Change tagcloud-link into a button.
- Add missing ID attribute in tools.php.
Props afercia. Fixes #31449.
Built from https://develop.svn.wordpress.org/trunk@31566


git-svn-id: http://core.svn.wordpress.org/trunk@31547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 02:50:25 +00:00
Andrew Ozz
d84eda9f35 Grunt precommit cleanup. See [31533], [31535].
Built from https://develop.svn.wordpress.org/trunk@31538


git-svn-id: http://core.svn.wordpress.org/trunk@31519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-25 04:17:27 +00:00
Andrew Ozz
1857055bb8 PressThis v2, first run. Props michael-arestad, stephdau, marcelomazza, DrewAPicture, iseulde, afercia, kraftbj, rachelbaker, AramZS, dd32. See #31373.
Built from https://develop.svn.wordpress.org/trunk@31534


git-svn-id: http://core.svn.wordpress.org/trunk@31515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-25 01:50:26 +00:00