Hello,
I think the majority of inverters and batteries are installed in attics. It's been that way for several years now, and there's been no major warnings issued, at least not that I've seen.
My own battery is in the attic, and has been there for circa 15 - 16 months, now.
There were "fireman switches" installed in the attic, to cut the power from the solar panels, but no precaution for the battery, so the installer didn't seem to think it was a concern.
When I phoned my insurance company, after having the solar panels and kit installed, I think that they bumped up my premium, possibly by about 40-50 quid, from memory, but no mention of concerns about location of the battery.
In the unlikely event of a fire, odds are that the attic won't be the first place to go on fire, so I expect / hope to have everyone safely out of the house, I'm good time.
Ultimately, there are risks with just about everything, in this life...I don't think I'll worry too much about this one.