Skip to content

Commit

Permalink
Editor: remove deprecated isPressed prop in WP 6.5.
Browse files Browse the repository at this point in the history
The isPressed prop is deprecated in WP 6.5, and replaced by the native aria-pressed attribute.

WordPress/gutenberg#54740
  • Loading branch information
jeherve committed Mar 11, 2024
1 parent cbd9a3f commit 72526cf
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Update button's prop to match latest changes in WordPress 6.5.
2 changes: 1 addition & 1 deletion projects/packages/videopress/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@automattic/jetpack-videopress",
"version": "0.23.8",
"version": "0.23.9-alpha",
"description": "VideoPress package",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/videopress/#readme",
"bugs": {
Expand Down
2 changes: 1 addition & 1 deletion projects/packages/videopress/src/class-package-version.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* The Package_Version class.
*/
class Package_Version {
const PACKAGE_VERSION = '0.23.8';
const PACKAGE_VERSION = '0.23.9-alpha';

const PACKAGE_SLUG = 'videopress';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ export default function VideoPressEdit( {
}
} }
icon={ captionIcon }
isPressed={ showCaption }
aria-pressed={ showCaption }
label={ showCaption ? removeCaptionLabel : addCaptionLabel }
/>

Expand Down
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/update-button-aria-pressed
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: other

Block Editor: update button props to match latest changes in WordPress 6.5.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function ViewSelector( props ) {
selectAction( optionDefinition );
} }
className="components-tab-button"
isPressed={ isSelected }
aria-pressed={ isSelected }
key={ `jetpack-premium-content-tab-${ optionDefinition.id }` }
>
<span>{ optionDefinition.label }</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export function AiExcerptControl( {
label={ __( 'Advanced AI options', 'jetpack' ) }
icon={ aiAssistantIcon }
onClick={ toggleSetting }
isPressed={ isSettingActive }
aria-pressed={ isSettingActive }
isSmall
/>
</BaseControl>
Expand Down

0 comments on commit 72526cf

Please sign in to comment.