2012 Jul 03 11:29 AM
Hi Experts,
I have a selection screen which uses checkboxes as shown in the inserted image below:
The code used is shown below:
DATA chkbox TYPE xfeld.
selection-screen begin of line.
selection-screen comment 01(30) text-001 for field chkbox1. "text-001 = Checkbox
parameters chkbox1 like chkbox.
selection-screen comment 47(30) text-002 for field chkbox2. "text-002 holds no value
parameters chkbox2 like chkbox.
selection-screen end of line.
Here in the screen i get an accessibility issue, since only the first checkbox is mapped to the fieldname not the second one.
Is it possible to map the fieldname to both the checkboxes? if not what should be done to overcome the missing label issue for the second checkbox?
Thanks in advance.
Best Regards,
Vignesh S
2012 Jul 03 11:46 AM
Hi,
You cannot map the second checkbox to the label of the first.
Enter a value in text-002 and it will be displayed as a label in front of the second checkbox.
Sorry if my answer is not correct, but I'm not very sure that I have understood correctly your question.
Hi Laurent,
Thanks for your reply
Adding the text in the text element text-002 solves the missing label issue but ultimately the text element text-002 will also have same value as text element text-001, to avoid that i wanted to assign the first field label to both the checkboxes.
If it is not possible, as you said i will enter some values in the text element text-002 and is it possible to make this text element invisible in the run time?
Regards,
Vignesh S
2012 Jul 03 11:46 AM
Hi,
You cannot map the second checkbox to the label of the first.
Enter a value in text-002 and it will be displayed as a label in front of the second checkbox.
Sorry if my answer is not correct, but I'm not very sure that I have understood correctly your question.
2012 Jul 03 11:52 AM
Hi Laurent,
Thanks for your reply
Adding the text in the text element text-002 solves the missing label issue but ultimately the text element text-002 will also have same value as text element text-001, to avoid that i wanted to assign the first field label to both the checkboxes.
If it is not possible, as you said i will enter some values in the text element text-002 and is it possible to make this text element invisible in the run time?
Regards,
Vignesh S
2012 Jul 03 11:55 AM
You can make the text element invisible at " on selection-screen output" event by modifying the screen table.
Just from curiosity, what is the meaning to have 2 checkboxes with the exact same label ? How will the user will understand what to select ? Can you shortly describe the business need ?
2012 Jul 03 11:59 AM
attached below is the original screenshot which will answer your question,
Just to simplify it, i have used a simple code.
2012 Jul 03 12:01 PM
2012 Jul 03 12:15 PM
Hi Laurent,
I tried the following,
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME = 'CHKBOX2'.
SCREEN-INVISIBLE = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
This makes the checkbox also invisible.
Is it possible to just make the text element text-002 invisible but to retain the checkbox?
2012 Jul 03 12:23 PM
Use the modif id addition.
selection-screen comment 01(30) text-001 for field chkbox1 modif id 'TXT'.
Loop at screen.
if screen-group1 = 'TXT'.
screen-invisible = '1'.
modify : screen.
endif.
endloop.
2012 Jul 03 12:30 PM
I tried the same but still the output shows the text element
Code Used:
DATA chkbox TYPE xfeld.
selection-screen begin of line.
selection-screen comment 01(30) text-001 for field chkbox1.
parameters: chkbox1 like chkbox.
selection-screen comment 47(30) text-002 for field chkbox2 MODIF ID TXT.
parameters: chkbox2 like chkbox.
selection-screen end of line.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'TXT'.
SCREEN-INVISIBLE = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
2012 Jul 03 12:35 PM
Try adding screen-active = 0.
Question ? Why using text element and try to hide it afterwards than no to use text element at all for the second checkbox ?
selection-screen comment 01(30) text-001 for field chkbox1.
parameters: chkbox1 like chkbox.
selection-screen position 77.
parameters: chkbox2 like chkbox.
Regards.
2012 Jul 03 12:43 PM
The reason why i am adding a text element here is to overcome the accessibility issue.
There is a tool called 'FACTS' which we should run to check whether the screens are accessible compliant or not. When i ran this tool in one of the screens it gave 'missing label' errors for all the second checkboxes in each row. i guess if i can make the label for the second checkbox invisible, there wont be any changes to the UI as well as the screen reader will still be able to read it.
Regards
Vignesh S
2012 Jul 03 12:46 PM
LOOP AT SCREEN.
IF screen-name = '%F002003_1000'.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Give the text name here and check.
If this is different, then go to debug mode and find SCREEN value for the text-002.
Thanks,
Shambu
2012 Jul 03 12:48 PM
Add the screen-active = 0 as proposed. I just tested it. It will work.
Regards.
2012 Jul 03 2:21 PM
2012 Jul 05 7:01 AM
Hi Laurent,
Thanks for your time and help.
I tried the screen-active = 0, it worked, but the tool still gives error. SO i guess the only solution is to get the exception for the screen or re design it in such a way that all the checkboxes have a label
Best Regards,
Vignesh S
2012 Jul 03 12:00 PM
I am perfectly getting two checkbox titles.
What do you mean exactly by accessibility issue? Have you maintained text-002?
2012 Jul 03 12:11 PM
I do not want to display two different field name since the field name for both the checkboxes will be the same.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |