Skip to content

Remove redundant title attributes from Classic Editor placeholders #8263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/js/_enqueues/vendor/tinymce/plugins/wordpress/plugin.js
Original file line number Diff line number Diff line change
@@ -116,7 +116,7 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {

event.content = event.content.replace( /<!--more(.*?)-->/g, function( match, moretext ) {
return '<img src="' + tinymce.Env.transparentSrc + '" data-wp-more="more" data-wp-more-text="' + moretext + '" ' +
'class="wp-more-tag mce-wp-more" alt="" title="' + title + '" data-mce-resize="false" data-mce-placeholder="1" />';
'class="wp-more-tag mce-wp-more" alt="' + title + '" data-mce-resize="false" data-mce-placeholder="1" />';
});
}

@@ -125,7 +125,7 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {

event.content = event.content.replace( /<!--nextpage-->/g,
'<img src="' + tinymce.Env.transparentSrc + '" data-wp-more="nextpage" class="wp-more-tag mce-wp-nextpage" ' +
'alt="" title="' + title + '" data-mce-resize="false" data-mce-placeholder="1" />' );
'alt="' + title + '" data-mce-resize="false" data-mce-placeholder="1" />' );
}

if ( event.load && event.format !== 'raw' ) {
@@ -144,10 +144,9 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
'data-wp-preserve="' + encodeURIComponent( match ) + '" ' +
'data-mce-resize="false" ' +
'data-mce-placeholder="1" '+
'class="mce-object" ' +
'class="mce-object mce-object-' + tag + '" ' +
'width="20" height="20" '+
'alt="&lt;' + tag + '&gt;" ' +
'title="&lt;' + tag + '&gt;" ' +
'/>';
} );
}
@@ -214,7 +213,7 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
classname += ' mce-wp-' + tag;
title = tag === 'more' ? 'Read more...' : 'Next page';
title = __( title );
html = '<img src="' + tinymce.Env.transparentSrc + '" alt="" title="' + title + '" class="' + classname + '" ' +
html = '<img src="' + tinymce.Env.transparentSrc + '" alt="' + title + '" class="' + classname + '" ' +
'data-wp-more="' + tag + '" data-mce-resize="false" data-mce-placeholder="1" />';

// Most common case.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -160,6 +160,14 @@ img[data-mce-selected]::selection {
background: transparent url( images/pagebreak.png ) repeat-y scroll center center;
}

.mce-object-style {
background-image: url( images/style.svg );
}

.mce-object-script {
background-image: url( images/script.svg );
}

/* Styles for formatting the boundaries of anchors and code elements */
.mce-content-body a[data-mce-selected] {
padding: 0 2px;

Unchanged files with check annotations Beta

await expect(
page,
'should redirect to the installation page'
).toHaveURL( /wp-admin\/install\.php$/ );

Check failure on line 40 in tests/e2e/specs/install.test.js

GitHub Actions / Test with SCRIPT_DEBUG disabled / Run E2E tests

[chromium] › tests/e2e/specs/install.test.js:34:6 › WordPress installation process › should install WordPress with pre-existing database credentials

1) [chromium] › tests/e2e/specs/install.test.js:34:6 › WordPress installation process › should install WordPress with pre-existing database credentials Error: should redirect to the installation page Timed out 5000ms waiting for expect(locator).toHaveURL(expected) Locator: locator(':root') Expected pattern: /wp-admin\/install\.php$/ Received string: "http://localhost:8889/" Call log: - should redirect to the installation page with timeout 5000ms - waiting for locator(':root') 9 × locator resolved to <html lang="en-US">…</html> - unexpected value "http://localhost:8889/" 38 | page, 39 | 'should redirect to the installation page' > 40 | ).toHaveURL( /wp-admin\/install\.php$/ ); | ^ 41 | 42 | await expect( 43 | page.getByText( /WordPress database error/ ), at /home/runner/work/wordpress-develop/wordpress-develop/tests/e2e/specs/install.test.js:40:5
await expect(
page.getByText( /WordPress database error/ ),
test( 'Test dismissing failed upload works correctly', async ({ page, admin, requestUtils }) => {
// Log in before visiting admin page.
await requestUtils.login();
await admin.visitAdminPage( '/media-new.php' );

Check failure on line 14 in tests/e2e/specs/media-upload.test.js

GitHub Actions / Test with SCRIPT_DEBUG disabled / Run E2E tests

[chromium] › tests/e2e/specs/media-upload.test.js:11:5 › Test dismissing failed upload works correctly

2) [chromium] › tests/e2e/specs/media-upload.test.js:11:5 › Test dismissing failed upload works correctly Error: Not logged in 12 | // Log in before visiting admin page. 13 | await requestUtils.login(); > 14 | await admin.visitAdminPage( '/media-new.php' ); | ^ 15 | 16 | // It takes a moment for the multi-file uploader to become available. 17 | await page.waitForLoadState('load'); at Admin.visitAdminPage (/home/runner/work/wordpress-develop/wordpress-develop/node_modules/@wordpress/e2e-test-utils-playwright/src/admin/visit-admin-page.ts:36:9) at /home/runner/work/wordpress-develop/wordpress-develop/tests/e2e/specs/media-upload.test.js:14:2

Check failure on line 14 in tests/e2e/specs/media-upload.test.js

GitHub Actions / Test with SCRIPT_DEBUG enabled / Run E2E tests

[chromium] › tests/e2e/specs/media-upload.test.js:11:5 › Test dismissing failed upload works correctly

1) [chromium] › tests/e2e/specs/media-upload.test.js:11:5 › Test dismissing failed upload works correctly Error: Not logged in 12 | // Log in before visiting admin page. 13 | await requestUtils.login(); > 14 | await admin.visitAdminPage( '/media-new.php' ); | ^ 15 | 16 | // It takes a moment for the multi-file uploader to become available. 17 | await page.waitForLoadState('load'); at Admin.visitAdminPage (/home/runner/work/wordpress-develop/wordpress-develop/node_modules/@wordpress/e2e-test-utils-playwright/src/admin/visit-admin-page.ts:36:9) at /home/runner/work/wordpress-develop/wordpress-develop/tests/e2e/specs/media-upload.test.js:14:2

Check failure on line 14 in tests/e2e/specs/media-upload.test.js

GitHub Actions / Test with SCRIPT_DEBUG enabled / Run E2E tests

[chromium] › tests/e2e/specs/media-upload.test.js:11:5 › Test dismissing failed upload works correctly

1) [chromium] › tests/e2e/specs/media-upload.test.js:11:5 › Test dismissing failed upload works correctly Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Not logged in 12 | // Log in before visiting admin page. 13 | await requestUtils.login(); > 14 | await admin.visitAdminPage( '/media-new.php' ); | ^ 15 | 16 | // It takes a moment for the multi-file uploader to become available. 17 | await page.waitForLoadState('load'); at Admin.visitAdminPage (/home/runner/work/wordpress-develop/wordpress-develop/node_modules/@wordpress/e2e-test-utils-playwright/src/admin/visit-admin-page.ts:36:9) at /home/runner/work/wordpress-develop/wordpress-develop/tests/e2e/specs/media-upload.test.js:14:2
// It takes a moment for the multi-file uploader to become available.
await page.waitForLoadState('load');