Make WordPress Core

Changeset 51637


Ignore:
Timestamp:
08/19/2021 02:06:06 AM (3 years ago)
Author:
peterwilsoncc
Message:

Customize: Hide native control on background position field.

Hide the browser's native radio button on the custom background position selector in the Customizer and the legacy background screen. This fixes an issue causing both to display.

Props mukesh27, ravipatel, sabernhardt, walbo.
Fixes #53803.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-custom-background.php

    r50706 r51637  
    419419                <?php foreach ( $group as $value => $input ) : ?>
    420420        <label>
    421             <input class="screen-reader-text" name="background-position" type="radio" value="<?php echo esc_attr( $value ); ?>"<?php checked( $value, $background_position ); ?>>
     421            <input class="ui-helper-hidden-accessible" name="background-position" type="radio" value="<?php echo esc_attr( $value ); ?>"<?php checked( $value, $background_position ); ?>>
    422422            <span class="button display-options position"><span class="<?php echo esc_attr( $input['icon'] ); ?>" aria-hidden="true"></span></span>
    423423            <span class="screen-reader-text"><?php echo $input['label']; ?></span>
  • trunk/src/wp-includes/customize/class-wp-customize-background-position-control.php

    r46586 r51637  
    9797                    <?php foreach ( $group as $value => $input ) : ?>
    9898                        <label>
    99                             <input class="screen-reader-text" name="background-position" type="radio" value="<?php echo esc_attr( $value ); ?>">
     99                            <input class="ui-helper-hidden-accessible" name="background-position" type="radio" value="<?php echo esc_attr( $value ); ?>">
    100100                            <span class="button display-options position"><span class="<?php echo esc_attr( $input['icon'] ); ?>" aria-hidden="true"></span></span>
    101101                            <span class="screen-reader-text"><?php echo $input['label']; ?></span>
Note: See TracChangeset for help on using the changeset viewer.