Skip to content

Convert visual tabs into tablist and tabpanel in taxonomies#11035

Open
joedolson wants to merge 8 commits intoWordPress:trunkfrom
joedolson:fix-taxonomy-tabs
Open

Convert visual tabs into tablist and tabpanel in taxonomies#11035
joedolson wants to merge 8 commits intoWordPress:trunkfrom
joedolson:fix-taxonomy-tabs

Conversation

@joedolson
Copy link
Contributor

The tab list for switching between the term list and frequently used lists in classic editor views needs to be marked up as a list of tabpanels.

Trac ticket: https://core.trac.wordpress.org/ticket/63981

Use of AI Tools

none


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@github-actions
Copy link

github-actions bot commented Feb 25, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props joedolson, mukesh27, alh0319.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions
Copy link

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@amberhinds
Copy link

@joedolson I'm having trouble testing this using playground. Here are the steps I've taken:

  1. Load playground for PR 11035.
  2. Install and activate classic editor plugin.
  3. Go to the edit screen for the Hello World blog post.
  4. Inspect the code on the categories metabox.

This is what I see:
Screenshot showing expanded dev tools. Code follows.

<div id="taxonomy-category" class="categorydiv">
		<ul id="category-tabs" class="category-tabs">
			<li class="tabs"><a href="#category-all">All Categories</a></li>
			<li class="hide-if-no-js"><a href="#category-pop">Most Used</a></li>
		</ul>

		<div id="category-pop" class="tabs-panel" style="display: none;">
			<ul id="categorychecklist-pop" class="categorychecklist form-no-clear">
				
		<li id="popular-category-1" class="popular-category">
			<label class="selectit">
				<input id="in-popular-category-1" type="checkbox" checked="checked" value="1">
				Uncategorized			</label>
		</li>

					</ul>
		</div>

		<div id="category-all" class="tabs-panel">
			<input type="hidden" name="post_category[]" value="0">			<ul id="categorychecklist" data-wp-lists="list:category" class="categorychecklist form-no-clear">
				
<li id="in-category-1-1" class="popular-category"><label class="selectit"><input value="1" type="checkbox" name="post_category[]" id="in-category-1-2" checked="checked"> Uncategorized</label></li>
			</ul>
		</div>
				<div id="category-adder" class="wp-hidden-children">
				<a id="category-add-toggle" href="#category-add" class="hide-if-no-js taxonomy-add-new">
					+ Add Category				</a>
				<p id="category-add" class="category-add wp-hidden-child">
					<label class="screen-reader-text" for="newcategory">Add Category</label>
					<input type="text" name="newcategory" id="newcategory" class="form-required form-input-tip" value="New Category Name" aria-required="true">
					<label class="screen-reader-text" for="newcategory_parent">
						Parent Category:					</label>
					<select name="newcategory_parent" id="newcategory_parent" class="postform">
	<option value="-1">— Parent Category —</option>
	<option class="level-0" value="1">Uncategorized</option>
</select>
					<input type="button" id="category-add-submit" data-wp-lists="add:categorychecklist:category-add" class="button category-add-submit" value="Add Category">
					<input type="hidden" id="_ajax_nonce-add-category" name="_ajax_nonce-add-category" value="c7402d10a1">					<span id="category-ajax-response"></span>
				</p>
			</div>
			</div>

There's no change to the tab markup here. Can you please help clarify how to test it?

@joedolson
Copy link
Contributor Author

@amberhinds Weird. I just did exactly the same thing, and I can see the updated source. I don't know why you'd have been seeing anything different. Playground wouldn't have any cache, so it can't be that.

Maybe just try again? Perhaps Playground failed to apply the patch? I'll also update the branch, in case that could have caused any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants