Skip to content

fix(developer): validate id and modifiers attributes in Layr compiler - #16456

Merged
mcdurdin merged 1 commit into
masterfrom
fix/developer/12423-ldml-validate-layer-attributes
Sep 2, 2026
Merged

fix(developer): validate id and modifiers attributes in Layr compiler#16456
mcdurdin merged 1 commit into
masterfrom
fix/developer/12423-ldml-validate-layer-attributes

Conversation

@mcdurdin

@mcdurdin mcdurdin commented Aug 28, 2026

Copy link
Copy Markdown
Member

Per the spec, the id attribute is required for touch layers, and modifiers attribute is required for hardware layers. There is ambiguity in the spec at present as to whether they should be allowed for the alternative type.

  • Validate that the attributes are present where required.
  • Tighten validation of modifiers attribute - it cannot be empty or missing for hardware; "" != "none".
  • Hint if the attribute is present when it probably shouldn't be (to be potentially raised to warning or error after spec clarified, CLDR-19755).
  • Fixup all keyboard3 xml files to conform to spec and eliminate hints.
  • Add unit tests.
  • Removed threshold warning for coverage as kmc-ldml is already > 90%.

Fixes: #12423
Test-bot: skip

Per the spec, the `id` attribute is required for touch layers, and
`modifiers` attribute is required for hardware layers. There is
ambiguity in the spec at present as to whether they should be allowed
for the alternative type.

* Validate that the attributes are present where required.
* Tighten validation of `modifiers` attribute - it cannot be empty or
  missing for hardware; "" != "none".
* Hint if the attribute is present when it probably shouldn't be (to be
  potentially raised to warning or error after spec clarified).
* Fixup all keyboard3 xml files to conform to spec and eliminate hints.
* Add unit tests.
* Removed threshold warning for coverage as kmc-ldml is already > 90%.

Fixes: #12423
@keymanapp-test-bot

keymanapp-test-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

User Test Results

Test specification and instructions

User tests are not required

Test Artifacts

  • Developer
    • Keyman Developer - build : all tests passed (no artifacts on BuildLevel "build")
    • Compiler Regression Tests - build : all tests passed (no artifacts on BuildLevel "build")
    • kmcomp.zip - build : all tests passed (no artifacts on BuildLevel "build")
  • Keyboards
    • Test Keyboards - build : all tests passed (no artifacts on BuildLevel "build")
  • macOS
    • Keyman for macOS (.dmg) - build : all tests passed (no artifacts on BuildLevel "build")
    • Keyman for macOS (.pkg) - build : all tests passed (no artifacts on BuildLevel "build")
  • Web
    • KeymanWeb Test Home - build : all tests passed (no artifacts on BuildLevel "build")
  • Windows
    • Keyman for Windows - build : all tests passed (no artifacts on BuildLevel "build")
    • FirstVoices Keyboards for Windows - build : all tests passed (no artifacts on BuildLevel "build")
    • Text Editor (ARM64) - build : all tests passed (no artifacts on BuildLevel "build")
    • Text Editor (x64) - build : all tests passed (no artifacts on BuildLevel "build")
    • Text Editor (x86) - build : all tests passed (no artifacts on BuildLevel "build")

@keyman-server keyman-server modified the milestones: A19S36, B19S1 Aug 30, 2026
Base automatically changed from fix/developer/16454-validate-hardware-layout-count-only-in-layrs to master September 2, 2026 08:59
@mcdurdin
mcdurdin merged commit 7a9983d into master Sep 2, 2026
25 checks passed
@mcdurdin
mcdurdin deleted the fix/developer/12423-ldml-validate-layer-attributes branch September 2, 2026 08:59
@github-project-automation github-project-automation Bot moved this from Todo to Done in Keyman Sep 2, 2026
@keyman-server

Copy link
Copy Markdown
Collaborator

Changes in this pull request will be available for download in Keyman version 19.0.278-alpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

bug(developer): add ldml compiler warning for <layers formId="us"><layer id="base"> pattern

3 participants