Make WordPress Core

Changeset 51640


Ignore:
Timestamp:
08/19/2021 01:45:18 PM (3 years ago)
Author:
desrosj
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, peterwilsoncc.
Merges [51637] to the 5.8 branch.
Fixes #53803.

Location:
branches/5.8
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/5.8

  • branches/5.8/src/wp-admin/includes/class-custom-background.php

    r50706 r51640  
    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>
  • branches/5.8/src/wp-includes/customize/class-wp-customize-background-position-control.php

    r46586 r51640  
    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.