Skip to content

Redirects to be set before initial import. #17

Closed

Description

@rianrietveld

Redirects for now, in the future, when the content is also published on developer.wordpress.org we can point to the relevant info there directly.

Redirects

about

Old: https://make.wordpress.org/accessibility/handbook/about/accessibility-improvement-project/
New: https://make.wordpress.org/accessibility/handbook/get-involved/tickets-tasks-reports/

get-involved

Old: https://make.wordpress.org/accessibility/handbook/get-involved/site-feedback-guide/
New: https://make.wordpress.org/accessibility/handbook/get-involved/audits-and-testing/

which-questions-should-you-ask

Old: https://make.wordpress.org/accessibility/handbook/which-questions-should-you-ask/
New: https://make.wordpress.org/accessibility/handbook/accessibility-guidelines/

best-practices

All (sub)pages point to index page best-practices: https://make.wordpress.org/accessibility/handbook/best-practices/

https://make.wordpress.org/accessibility/handbook/best-practices/accessibility-overview/
https://make.wordpress.org/accessibility/handbook/best-practices/quick-start-guide/
https://make.wordpress.org/accessibility/handbook/best-practices/training-and-resources/

markup

These (sub)pages point to index page best-practices: https://make.wordpress.org/accessibility/handbook/best-practices/,
https://make.wordpress.org/accessibility/handbook/markup/
https://make.wordpress.org/accessibility/handbook/markup/aria-landmarks/
https://make.wordpress.org/accessibility/handbook/markup/design-patterns/
https://make.wordpress.org/accessibility/handbook/markup/heading-structure-in-theme-development/
https://make.wordpress.org/accessibility/handbook/markup/semantic-html/
https://make.wordpress.org/accessibility/handbook/markup/tables/
https://make.wordpress.org/accessibility/handbook/markup/web-forms/
https://make.wordpress.org/accessibility/handbook/markup/wp-a11y-speak

These (sub)pages point to another URL:
Old: https://make.wordpress.org/accessibility/handbook/markup/core-accessibility-standards/
New: https://make.wordpress.org/accessibility/handbook/accessibility-guidelines/

Old: https://make.wordpress.org/accessibility/handbook/markup/skip-links/
New: https://make.wordpress.org/accessibility/handbook/best-practices/skip-links/

Old: https://make.wordpress.org/accessibility/handbook/markup/the-css-class-screen-reader-text/
New: https://make.wordpress.org/accessibility/handbook/best-practices/the-css-class-screen-reader-text/

plugin-accessibility

Old: https://make.wordpress.org/accessibility/handbook/plugin-accessibility/
New: https://make.wordpress.org/accessibility/handbook/best-practices/

which-tools-can-i-use

All (sub)pages point to index page best-practices: https://make.wordpress.org/accessibility/handbook/best-practices/

https://make.wordpress.org/accessibility/handbook/which-tools-can-i-use/
https://make.wordpress.org/accessibility/handbook/which-tools-can-i-use/education-opportunities/
https://make.wordpress.org/accessibility/handbook/which-tools-can-i-use/other-plugins-to-improve-accessibility/
https://make.wordpress.org/accessibility/handbook/which-tools-can-i-use/useful-tools/
https://make.wordpress.org/accessibility/handbook/which-tools-can-i-use/wp-accessibility-plugin/

which-themes-can-you-use

Old: https://make.wordpress.org/accessibility/handbook/which-themes-can-you-use/
New: https://make.wordpress.org/accessibility/handbook/accessibility-guidelines/

content

All (sub)pages point to index page best-practices: https://make.wordpress.org/accessibility/handbook/best-practices/

https://make.wordpress.org/accessibility/handbook/content/
https://make.wordpress.org/accessibility/handbook/content/accessible-pdfs
https://make.wordpress.org/accessibility/handbook/content/good-link-texts
https://make.wordpress.org/accessibility/handbook/content/link-destinations
https://make.wordpress.org/accessibility/handbook/content/readability
https://make.wordpress.org/accessibility/handbook/content/using-headings-in-content

test-for-web-accessibility

All (sub)pages point to index page best-practices: https://make.wordpress.org/accessibility/handbook/best-practices/

https://make.wordpress.org/accessibility/handbook/test-for-web-accessibility/test-for-web-accessibility-content/
https://make.wordpress.org/accessibility/handbook/test-for-web-accessibility/test-for-web-accessibility-design/
https://make.wordpress.org/accessibility/handbook/test-for-web-accessibility/test-for-web-accessibility-frontend-code/

Activity

  1. changed the title [-]Redirect to be set before initial import.[/-] [+]Redirects to be set before initial import.[/+] on Sep 22, 2026
  2. coffee2code commented on Sep 24, 2026

    @coffee2code
    Contributor

    Redirect are defined in site-specific mu-plugin files that aren't open-sourced. Here's the redirect code that would appear in that file that takes into account the redirects you've specified above. Let me know if I misunderstood your intent.

    The only content note I have is that test-for-web-accessibility subpages are requested to be redirected to best-practices, though there is a best-practices/test-for-web-accessibility page. The code draft below adheres to your original request, but I can change it if need be.

    /**
     * Redirects handbook URLs.
     *
     * Notes:
     * - This is contingent on the handbook using the 'handbook' post type (i.e. a single-handbook site).
     * - Currently only redirects handbook pages within the same handbook.
     */
    add_action( 'template_redirect', function() {
    	$handbook_page = get_query_var( 'handbook' );
    
    	// Only redirect handbook pages.
    	if ( ! $handbook_page ) {
    			return;
    	}
    
    	$redirect = null;
    
    	switch ( $handbook_page ) {
    		case 'best-practices/accessibility-overview':
    		case 'best-practices/quick-start-guide':
    		case 'best-practices/training-and-resources':
    		case 'content':
    		case 'content/accessible-pdfs':
    		case 'content/good-link-texts':
    		case 'content/link-destinations':
    		case 'content/readability':
    		case 'content/using-headings-in-content':
    		case 'markup':
    		case 'markup/aria-landmarks':
    		case 'markup/design-patterns':
    		case 'markup/heading-structure-in-theme-development':
    		case 'markup/semantic-html':
    		case 'markup/tables':
    		case 'markup/web-forms':
    		case 'markup/wp-a11y-speak':
    		case 'plugin-accessibility':
    		case 'test-for-web-accessibility/test-for-web-accessibility-content':
    		case 'test-for-web-accessibility/test-for-web-accessibility-design':
    		case 'test-for-web-accessibility/test-for-web-accessibility-frontend-code':
    		case 'which-tools-can-i-use':
    		case 'which-tools-can-i-use/education-opportunities':
    		case 'which-tools-can-i-use/other-plugins-to-improve-accessibility':
    		case 'which-tools-can-i-use/useful-tools':
    		case 'which-tools-can-i-use/wp-accessibility-plugin':
    			$redirect = 'best-practices';
    			break;
    		case 'about/accessibility-improvement-project':
    			$redirect = 'get-involved/tickets-tasks-reports';
    			break;
    		case 'get-involved/site-feedback-guide':
    			$redirect = 'get-involved/audits-and-testing';
    			break;
    		case 'markup/core-accessibility-standards':
    		case 'which-questions-should-you-ask':
    		case 'which-themes-can-you-use':
    			$redirect = 'accessibility-guidelines';
    			break;
    		case 'markup/skip-links':
    			$redirect = 'best-practices/skip-links';
    			break;
    		case 'markup/the-css-class-screen-reader-text':
    			$redirect = 'best-practices/the-css-class-screen-reader-text';
    			break;
    		default:
    			$redirect = null;
    	}
    
    	if ( $redirect ) {
    		wp_safe_redirect( home_url( '/handbook/' . $redirect . '/' ), 301 );
    		exit;
    	}
    } );
  3. rianrietveld commented on Sep 25, 2026

    @rianrietveld
    MemberAuthor

    @coffee2code thanks so much for putting this together.

    You are right about the test-for-web-accessibility subpages.

    So for that pages:

    case 'test-for-web-accessibility':
    case 'test-for-web-accessibility/test-for-web-accessibility-content':
    case 'test-for-web-accessibility/test-for-web-accessibility-design':
    case 'test-for-web-accessibility/test-for-web-accessibility-frontend-code':
        redirect = 'best-practices/test-for-web-accessibility';
        break;

    Where does this code live? When the knowledge base on wpaccessibility.org is migrates to developer.wordpress.org this urls need to point to the new pages.

  4. coffee2code commented on Sep 30, 2026

    @coffee2code
    Contributor

    @rianrietveld I've added those changes to my copy of the redirect script. Are you saying that those test-for-web-accessibility links will need to redirect to developer.wordpress.org at some point? If so, we may want to consider using a 302 (temporarily moved) redirect response rather than a permanent 301. Are there other such temporary redirects amongst the whole list?

    The code will be in a closed-source mu-plugin, mostly out of convenience and convention. Future redirects can be requested through meta.trac. We could consider putting a copy of the redirects as a script in this repo, but it would be a copy and not one actively used or reference by wordpress.org.

    Also, do you have a desired timeframe for when you'd like the handbook imported and redirects added to production?

  5. rianrietveld commented on Oct 1, 2026

    @rianrietveld
    MemberAuthor

    Hey @coffee2code

    Yes, the plan is to move info on wpaccessibility.org to a new section named accessibility on developer.wordpress.org.
    This includes the sections Start with accessibility, Standards and best practice and Test for accessibility.
    And then a 302 redirect, for now, makes sence.

    Having a copy of the redirects as a script in this repo would be very helpful.

    As for the timeframe: as soon as possible.

    Thanks for helping out 🌷

  6. rianrietveld commented on Oct 1, 2026

    @rianrietveld
    MemberAuthor

    cc @joedolson 👆

  7. coffee2code commented on Oct 20, 2026

    @coffee2code
    Contributor

    The redirects were implemented for the handbook in production just after the initial import of the handbook from GitHub on 2026-10-13. And #22 adds a copy of the redirects to this repo for future reference. These should close out this issue.

  8. rianrietveld commented on Oct 20, 2026

    @rianrietveld
    MemberAuthor

    Thanks @coffee2code 🌷 #22 is merged.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions