Bug fixes, aria, cross platform support.

This commit is contained in:
2026-05-18 22:31:29 -04:00
parent 603a0aa0e3
commit b092c3247f
4 changed files with 119 additions and 33 deletions
+9
View File
@@ -81,6 +81,15 @@ final class HRWTests: XCTestCase {
let htmlRoot = rootNodes[2]
print(htmlRoot.toString())
}
func testAriaAttributesAreGlobal() throws {
guard let xmlReader = XMLParser(str: #"<span aria-hidden="true">Hidden</span>"#) else { throw EmptyStringError() }
let rootNodes = try xmlReader.readObjects()
let span = rootNodes[0] as! Span
XCTAssertEqual(span.ariaAttributes["aria-hidden"], "true")
XCTAssertTrue(span.renderAttributes().contains("aria-hidden='true'"))
}
func testBindingGenerator() throws {
IHtmlNodeContainerUtility.sharedInstance.defaultBaseDir = "/Users/isaacpaul/Projects/swift-projects/HRW/Tests/HRWTests"