Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Accessibility issue with screen field

0 Likes
4,358

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

1 ACCEPTED SOLUTION
Read only

laurent_fournier2
Contributor
0 Likes
4,336

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

16 REPLIES 16
Read only

laurent_fournier2
Contributor
0 Likes
4,337

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.

Read only

0 Likes
4,336

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

Read only

0 Likes
4,336

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 ?

Read only

0 Likes
4,335

attached below is the original screenshot which will answer your question,

Just to simplify it, i have used a simple code.

Read only

0 Likes
4,335

OK,Understood. Now it's clear.

Regards.

Read only

0 Likes
4,335

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?

Read only

0 Likes
4,335

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.


Read only

0 Likes
4,335

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.

Read only

0 Likes
4,335

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.

Read only

0 Likes
4,335

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

Read only

0 Likes
4,335

    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

Read only

0 Likes
4,335

Add the screen-active = 0 as proposed. I just tested it. It will work.

Regards.

Read only

0 Likes
4,335

So, did it worked ?

Read only

0 Likes
4,335

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

Read only

Former Member
0 Likes
4,335

I am perfectly getting two checkbox titles.

What do you mean exactly by accessibility issue? Have you maintained text-002?

Read only

0 Likes
4,335

I do not want to display two different field name since the field name for both the checkboxes will be the same.