SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.92k stars 1.23k forks source link

[ui5-input]: Clear icon is not getting focus from keyboard #4021

Closed I575159 closed 3 months ago

I575159 commented 3 months ago

OpenUI5 version: 1.122.0

Browser/version (+device/version): Edge

Any other tested browsers/devices(FAIL):Chrome

URL (minimal example if possible):

User/password (if required and possible - do not post any confidential information here):

Steps to reproduce the problem: 1.Open ui5 demo kit, navigate to input control. 2.Make "showClearIcon" property true, which will display the clear icon in input field if there is any text present. 3.Try navigating to clear using keyboard.

Affected Component ui5-input

What is the expected result? Clear icon should get focus by keyboard navigation and screen reader should also read it properly.

What happens instead? Unable to navigate to clear icon in input field using keyboard.

ui5-input-issue

viktorsperling commented 3 months ago

Hello @I575159,

Thank you for sharing this finding. I've created an internal incident DINC0113710. The status of the issue will be updated here in GitHub.

Regards, Viktor

tw4 commented 3 months ago

Hello,

I have reviewed the issue and believe that changing the default value of noTabStop to false for the clear icon may resolve the problem. If you decide to proceed with this change, I would be happy to take care of it.

Here is the code example:


this._oClearButton = this.addEndIcon({
    src: IconPool.getIconURI("decline"),
    noTabStop: false,
    visible: false,
    alt: this._oRb.getText("INPUT_CLEAR_ICON_ALT"),
    useIconTooltip: false,
    decorative: false,
    press: function() {
        if (that.getValue() !== "") {
            that.setValue("");

            that.fireChange({
                value: ""
            });

            that.fireLiveChange({
                value: ""
            });

            that._bClearButtonPressed = true;

            setTimeout(function() {
                if (Device.system.desktop) {
                    that.focus();
                    that._closeSuggestionPopup();
                }
            }, 0);
        }
    }
}, 0);

return this._oClearButton;
};
I575159 commented 3 months ago

Hi, Suggested changes seem working for me, will flow the same.

Thanks