Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    JAws Compatibility listgrids Canvas and Button

    Hello everybody,

    I have some problems applying Jaws to our webapplication with smartgwt.
    We need our application to be barriere-free. The problem is, that cursor navigation seems not possible in Listgrids, where column 1 is defined by the following ListgridField


    ListGridField aListGridField = new StyledListGridField(
    "Title");
    aListGridField.setShowTitle(false);
    aListGridField.setWidth(25);
    aListGridField.setCanDragResize(false);
    aListGridField.setCanEdit(false);


    Fruthermore we add a Button for this row in each column.

    private StyleableListGrid aListgrid = new StyleableListGrid(
    "A Listgrid") {

    @Override
    protected Canvas createRecordComponent(ListGridRecord record,Integer colNum) {
    if (colNum == 1) {
    IButton aButton = new IButton(record);
    aButton.setWidth(130);
    aButton.setHeight(16);
    aButton.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
    ....
    }
    });
    return aButton ;
    }
    return null;
    }
    };

    The Listgrid itselve is enbedded in a Tab ([URL="http://forums.smartclient.com/core/☂=AZ_20/java\/lib\/frontend\/smartgwt\/smartgwtpower.jar

    The Listgrid has the following attributes

    aListgrid .setVirtualScrolling(false);
    aListgrid.setShowRecordComponents(true);
    aListgrid.setShowRecordComponentsByCell(true);
    aListgrid.setHeight100();
    aListgrid.setWidth100();
    aListgrid.setShowFilterEditor(true);
    aListgrid.setFilterOnKeypress(true);
    aListgrid.setAutoSaveEdits(true);


    When I navigate through the tab, the Cursor gets stuck in the first button (column 1, 1 row) and I don't know how to navigate further.

    I'm thankfull for any idea, that could help.

    Thanks, cklaar
    Last edited by cklaar; 5 Jul 2017, 03:41.

    #2
    Start by reading the FAQ and the Debugging topic in the reference: you've forgotten to provide any pertinent details, and you've not told us whether you've activated screenReader mode.

    You should also revisit the docs for showRecordComponents, as it advises specifically against this usage and provides alternatives.

    You also should not be turning off virtual scrolling (same doc).

    Comment


      #3
      Thanks for your answer.

      I will study the documents and provide pertinent details if it won't help.

      Comment


        #4
        Hello Isomorphic,

        I think I localized the error but I still can't explain it.

        We use SmartGwt 2.7.0 and I activated Screenreader (Jaws 17). I tried the application in Firefox and Chrome-Browser.

        I found the showcase: http://www.smartclient.com/smartgwt/...d_cell_widgets.

        This showcase does exactly, what we need to do. This showcase works fine in our application, that means I can navigate via tab to every element.

        Then I add the line

        SC.setScreenReaderMode(true);

        and voila, I can not tab through the listgrid anymore. The focus stays at the first button.

        PHP Code:
        package ...;

        import com.google.gwt.core.client.EntryPoint;
        import com.smartgwt.client.types.Alignment;
        import com.smartgwt.client.types.ListGridFieldType;
        import com.smartgwt.client.util.SC;
        import com.smartgwt.client.widgets.Canvas;
        import com.smartgwt.client.widgets.IButton;
        import com.smartgwt.client.widgets.ImgButton;
        import com.smartgwt.client.widgets.events.ClickEvent;
        import com.smartgwt.client.widgets.events.ClickHandler;
        import com.smartgwt.client.widgets.grid.ListGrid;
        import com.smartgwt.client.widgets.grid.ListGridField;
        import com.smartgwt.client.widgets.grid.ListGridRecord;
        import com.smartgwt.client.widgets.layout.HLayout;

        import ....CountrySampleData;

        public class 
        Frontend implements EntryPoint {

        public 
        void onModuleLoad() {

        //-------------------------------------->
        // I only added this line and the strange behavior occurs
            
        SC.setScreenReaderMode(true);

            final 
        ListGrid countryGrid = new ListGrid() {
            @
        Override
            
        protected Canvas createRecordComponent(final ListGridRecord record,
            
        Integer colNum) {

                
        String fieldName getFieldName(colNum);

        if (
        fieldName.equals("iconField")) {
        HLayout recordCanvas = new HLayout(3);
        recordCanvas.setHeight(22);
        recordCanvas.setWidth100();
        recordCanvas.setAlign(Alignment.CENTER);
        ImgButton editImg = new ImgButton();
        editImg.setShowDown(false);
        editImg.setShowRollOver(false);
        editImg.setLayoutAlign(Alignment.CENTER);
        editImg.setSrc("silk/comment_edit.png");
        editImg.setPrompt("Edit Comments");
        editImg.setHeight(16);
        editImg.setWidth(16);
        editImg.addClickHandler(new ClickHandler() {
        public 
        void onClick(ClickEvent event) {
        SC.say("Edit Comment Icon Clicked for country : "
        record.getAttribute("countryName"));
        }
        });

        ImgButton chartImg = new ImgButton();
        chartImg.setShowDown(false);
        chartImg.setShowRollOver(false);
        chartImg.setAlign(Alignment.CENTER);
        chartImg.setSrc("silk/chart_bar.png");
        chartImg.setPrompt("View Chart");
        chartImg.setHeight(16);
        chartImg.setWidth(16);
        chartImg.addClickHandler(new ClickHandler() {
        public 
        void onClick(ClickEvent event) {
        SC.say("Chart Icon Clicked for country : "
        record.getAttribute("countryName"));
        }
        });

        recordCanvas.addMember(editImg);
        recordCanvas.addMember(chartImg);
        return 
        recordCanvas;
        } else if (
        fieldName.equals("buttonField")) {
        IButton button = new IButton();
        button.setHeight(26);
        button.setWidth(70);
        button.setIcon("flags/16/"
        record.getAttribute("countryCode") + ".png");
        button.setTitle("Info");
        button.addClickHandler(new ClickHandler() {
        public 
        void onClick(ClickEvent event) {
        SC.say(record.getAttribute("countryName")
        " info button clicked.");
        }
        });
        return 
        button;
        } else {
        return 
        null;
        }

        }
        };
        countryGrid.setWidth(600);
        countryGrid.setHeight(224);

        countryGrid.setVirtualScrolling(false);
        countryGrid.setShowRecordComponents(true);
        countryGrid.setShowRecordComponentsByCell(true);
        countryGrid.setCanRemoveRecords(true);

        ListGridField countryCodeField = new ListGridField("countryCode",
        "Flag"40);
        countryCodeField.setAlign(Alignment.CENTER);
        countryCodeField.setType(ListGridFieldType.IMAGE);
        countryCodeField.setImageURLPrefix("flags/16/");
        countryCodeField.setImageURLSuffix(".png");

        ListGridField nameField = new ListGridField("countryName""Country");
        ListGridField capitalField = new ListGridField("capital""Capital");
        ListGridField continentField = new ListGridField("continent",
        "Continent");

        ListGridField buttonField = new ListGridField("buttonField""Info");
        buttonField.setAlign(Alignment.CENTER);

        ListGridField iconField = new ListGridField("iconField",
        "Comments/Stats");
        iconField.setWidth(120);

        countryGrid.setFields(countryCodeFieldnameFieldcapitalField,
        continentFieldbuttonFieldiconField);
        countryGrid.setCanResizeFields(true);
        countryGrid.setData(CountrySampleData.getRecords());

        countryGrid.draw();
        }



        In sum: all I did is executing Source.java and CountrySampleData.java and adding "SC.setScreenReaderMode(true);"

        Can someone explain this behavor?

        Thanks, cklaar
        Last edited by cklaar; 7 Jul 2017, 03:31.

        Comment


          #5
          Thanks for the clear test case. We see the issue and are having our development team take a look

          Regards
          Isomorphic Software

          Comment


            #6
            Hello Isomorphic,

            did your team already found something out, like a workaround or a fix via .jss script?

            Regards,

            cklaar

            Comment


              #7
              Hello Isomorphic,

              There seems to be a bug in .js files concerning screenreader_mode = true in combination with createrecordcomponent and buttons in it. Is that possible?

              A solution to this problem would help a lot to make our application barriere-free.

              Regards,

              viadee

              Comment


                #8
                Guys, we can see that you are posting from the same organization, so if you are trying to make it look like a lot of people care about this issue, we know it's only you.

                You've already been told this issue has been queued to be looked at, but is behind issues reported by customers with support contracts. If you want faster service, you should purchase support.

                Comment


                  #9
                  This issue is now fixed in the 5.1p and 6.1p branches.
                  Please try the next nightly build dated July 26 or above, and let us know if you continue to encounter this issue.

                  Regards
                  Isomorphic Software

                  Comment


                    #10
                    Hello Isomorphic-Team,

                    is it possible to apply the patch to the 5.0p branch too?

                    We have an old 5.0p application having the same issue. Unfortunately the migration to 5.1p fails because of incompatible changes to the interface RPCManagerCompletionCallback and an exception saying "Could not find a DSRequest for a SQLDataSource in getConnection" on application startup.

                    Best Regards
                    C. Lembeck

                    Comment


                      #11
                      We've backported this change - it should be there in the next nightly build for you (Aug 1 or above).

                      Please note though that we only ported this as it happened to be a very simple change to make. We almost always avoid making changes to stable patch-release branches that have been superceded by a subsequent minor version (5.0p to 5.1p for example), as any developers with a 5.x license can access the more recent version, and any projects under active development should be being built against the latest available code.
                      If this old application is undergoing any kind of work we'd highly recommend taking the time to resolve whatever issues are preventing you from shifting to 5.1p (or, better yet, moving to the latest major version, 12.x)

                      Regards
                      Isomorphic Software

                      Comment

                      Working...
                      X