Bug 2027299 - The status of checkbox component is not revealed correctly in code
Summary: The status of checkbox component is not revealed correctly in code
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.10
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.10.0
Assignee: Kim Dobestein
QA Contact: Xiyun Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-29 10:55 UTC by Xiyun Zhao
Modified: 2022-03-10 16:30 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-10 16:30:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 10578 0 None open Bug 2027299: The status of checkbox component is not revealed correctly in code 2021-11-29 20:31:20 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:30:57 UTC

Description Xiyun Zhao 2021-11-29 10:55:25 UTC
Description of problem:
The checkbox status, like 'use the default browser language setting, is not revealed correctly in code. It's hard for user to use automation code to identify the status of the component of checkbox.

Version-Release number of selected component (if applicable):
4.10.0-0.nightly-2021-11-28-164900

How reproducible:
Always

Steps to Reproduce:
1. Log into OCP, navigate to Language tab by click 'User Preferences' on the dropdown list of the user
2. Open developer mode on browser for tracking the HTML code
3. Check/Uncheck the checkbox of "Use the default browser language setting"
4. Verify if the code has correct elements and attributes

Actual results:
4. The code of HTML is not dynamic, user is hard to get the replacement solution to handle the status of the checkbox on automation case. There is a label 'checked' is always shown on the HTML code, even if the checkbox is on the state of 'Uncheck', like below shown:
   <input id="default-language-checkbox" data-test="checkbox console.preferredLanguage" class="pf-c-check__input" type="checkbox" aria-invalid="false" aria-label="Use the default browser language setting." data-ouia-component-type="PF4/Checkbox" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Checkbox-1" checked="">

Expected results:
4. HTML code should reveal the actual status of the element, when the component is in 'Unchecked' status
   1) the label 'checked' should have 'false' or use Unchecked label to identify the status

Additional info:
Same issue will also can be found on other same component, like 1) Checkbox of 'Secure Route' on Create Routes page 2) Checkbox of "Deny all ingress traffic" on 'Create NetworkPolicy' page and so on.

Comment 3 Xiyun Zhao 2021-12-21 12:20:07 UTC
This bug has been verified on payload 4.10.0-0.nightly-2021-12-18-034942

Verification Step:
1. Log into OCP, navigate to Language tab by click 'User Preferences' on the dropdown list of the user
2. Open developer mode on browser for tracking the HTML code
3. Check/Uncheck the checkbox of "Use the default browser language setting"
4. Verify if the code has correct elements and attributes

Result:
A new element "data-checked-state" has been added for the component for tracking the state. User is able to use the value of the attributes to identify check/uncheck now

Comment 7 errata-xmlrpc 2022-03-10 16:30:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.10.3 security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:0056


Note You need to log in before you can comment on or make changes to this bug.