Skip to content

fix: emit clear error for miscapitalized HTML attribute names#3998

Open
Madoshakalaka wants to merge 1 commit intomasterfrom
fix/case-insensitive-attr-collision
Open

fix: emit clear error for miscapitalized HTML attribute names#3998
Madoshakalaka wants to merge 1 commit intomasterfrom
fix/case-insensitive-attr-collision

Conversation

@Madoshakalaka
Copy link
Member

Description

When an attribute like onSubmit doesn't exactly match a known listener/boolean/special prop but matches case-insensitively, emit "Did you mean onsubmit?" instead of a cryptic IntoPropValue trait bound error.

Fixes #3996

Checklist

  • I have reviewed my own code
  • I have added tests

When an attribute like `onSubmit` doesn't exactly match a known
listener/boolean/special prop but matches case-insensitively, emit
"Did you mean `onsubmit`?" instead of a cryptic IntoPropValue trait
bound error.

Closes #3996
@github-actions
Copy link

Visit the preview URL for this PR (updated for commit d0eb878):

https://yew-rs-api--pr3998-fix-case-insensitive-3fobzaue.web.app

(expires Sun, 01 Mar 2026 06:19:27 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@github-actions
Copy link

Benchmark - SSR

Yew Master

Details
Benchmark Round Min (ms) Max (ms) Mean (ms) Standard Deviation
Baseline 10 270.259 274.336 270.940 1.214
Hello World 10 466.006 477.075 473.211 3.192
Function Router 10 1568.746 1598.163 1582.444 11.810
Concurrent Task 10 1005.198 1006.792 1006.146 0.584
Many Providers 10 991.184 1022.658 1003.086 10.121

Pull Request

Details
Benchmark Round Min (ms) Max (ms) Mean (ms) Standard Deviation
Baseline 10 270.400 270.664 270.509 0.084
Hello World 10 462.928 478.610 473.557 5.918
Function Router 10 1548.684 1572.429 1561.320 7.692
Concurrent Task 10 1004.616 1006.562 1005.696 0.531
Many Providers 10 1002.047 1046.922 1017.949 15.409

@github-actions
Copy link

Size Comparison

Details
examples master (KB) pull request (KB) diff (KB) diff (%)
async_clock 96.883 96.883 0 0.000%
boids 165.464 165.464 0 0.000%
communication_child_to_parent 89.884 89.884 0 0.000%
communication_grandchild_with_grandparent 100.922 100.922 0 0.000%
communication_grandparent_to_grandchild 97.416 97.416 0 0.000%
communication_parent_to_child 87.301 87.301 0 0.000%
contexts 102.917 102.917 0 0.000%
counter 84.032 84.032 0 0.000%
counter_functional 85.380 85.380 0 0.000%
dyn_create_destroy_apps 87.104 87.104 0 0.000%
file_upload 96.560 96.560 0 0.000%
function_delayed_input 90.956 90.956 0 0.000%
function_memory_game 168.992 168.992 0 0.000%
function_router 326.395 326.395 0 0.000%
function_todomvc 160.896 160.896 0 0.000%
futures 232.362 232.362 0 0.000%
game_of_life 102.282 102.282 0 0.000%
immutable 244.593 244.593 0 0.000%
inner_html 78.613 78.613 0 0.000%
js_callback 107.432 107.432 0 0.000%
keyed_list 177.152 177.152 0 0.000%
mount_point 81.743 81.743 0 0.000%
nested_list 110.726 110.726 0 0.000%
node_refs 89.188 89.188 0 0.000%
password_strength 1726.254 1726.254 0 0.000%
portals 90.763 90.763 0 0.000%
router 296.969 296.969 0 0.000%
suspense 110.940 110.940 0 0.000%
timer 86.566 86.566 0 0.000%
timer_functional 96.091 96.091 0 0.000%
todomvc 139.499 139.499 0 0.000%
two_apps 83.895 83.895 0 0.000%
web_worker_fib 133.646 133.646 0 0.000%
web_worker_prime 184.601 184.601 0 0.000%
webgl 81.243 81.243 0 0.000%

✅ None of the examples has changed their size significantly.

@Madoshakalaka Madoshakalaka added the A-yew-macro Area: The yew-macro crate label Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-yew-macro Area: The yew-macro crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error message when an HTML attribute has incorrect case is unhelpful

1 participant