Make WordPress Core

Opened 7 years ago

Last modified 4 years ago

#41106 new defect (bug)

wp_editor() doesn't support attributes besides id and class

Reported by: shelob9's profile Shelob9 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Editor Keywords:
Focuses: Cc:

Description

I'm replacing a generic textarea with a WYSIWIG field. My textarea has an aria-describedby attribute, but wp_editor() -- really _WP_Editors::editor() -- can't set any HTML attributes besides ID and class on the WYSIWIG.

Would be better if I could do something like this:

	wp_editor( 'hi-roy', 'Some text', array(
		'attrs' => array(
			'aria-describedby' => 'description'
		)
	));
	echo '<p id="description">Some description</p>';

Change History (2)

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


4 years ago

#2 @noisysocks
4 years ago

  • Component changed from General to Editor
Note: See TracTickets for help on using tickets.