Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kendo-theme-default Radio And CheckBox style not working with RTL direction #1668

Closed
BtShp opened this issue Jul 15, 2018 · 2 comments
Closed
Assignees

Comments

@BtShp
Copy link

BtShp commented Jul 15, 2018

I'm submitting a...

  • Bug report

Current behavior

I tried to use the style k-radio and k-checkbox in angular2 application,
RTL language.
But when I try to move the Radio before Label like RTL diraction-
the radio dosnt work and cant be pressed.

Expected behavior

use checkBox And radio style with RTL direction

Minimal reproduction of the problem with instructions

Try put k-radio or k-checkbox style with labels after them in RTL directions,
like:

<label class="k-radio-label" for="search"> </label>
<input class="k-radio" type="radio" name="optionsRadios" [(ngModel)]="optionSearch" id="search" value="searchByTender">

its not work!!
the radio cant be preesed.

In LTR direction it works well:

<input class="k-radio" type="radio" name="optionsRadios" [(ngModel)]="optionSearch" id="search" value="searchByTender">
<label class="k-radio-label" for="search"> </label>

Environment

Package versions:
"@progress/kendo-theme-default": "^2.45.2",


Browser:

  • Chrome (desktop) version 67.0.3396.99

System:

  • TypeScript version: 2.6.2
  • Node version: v8.9.3
  • Platform: Windows
@BtShp BtShp changed the title KendoUi Angular2 Radio And CheckBox style not working with RTL direction kendo-theme-default Radio And CheckBox style not working with RTL direction Jul 15, 2018
@elena-gancheva elena-gancheva self-assigned this Jul 16, 2018
@elena-gancheva
Copy link
Contributor

Hello @BtShp,

The RTL direction support comes from Kendo themes. We have implemented classes and selectors that you will need to add in you markup if you want to change the direction. You have to add attribute dir="rtl" or class class="k-rtl" to your template, in order to have proper RTL rendering. Changing the label and input elements' places in the DOM is not the proper way to handle RTL.

As an example I have prepared a plunker

It looks like we have a CSS glitch with input type="radio" button styling in RTL mode when checked. We will investigate further and fix it.

@gyoshev
Copy link

gyoshev commented Aug 1, 2018

The problem with the radio button RTL alignment has been resolved in telerik/kendo-themes#230.

The HTML of the radio buttons needs to be in the exact specified order, no matter if the application uses LTR or RTL text modes. The radio button labels are aligned correctly if the radio button is wrapped in a container with class="k-rtl" or has the dir=rtl attribute, which is by design. This appears to have no impact on accessibility or the development process; let us know if there are arguments against it and we will consider reopening the issue.

@gyoshev gyoshev closed this as completed Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants